My particular case is on Microsoft SQL server but this may be generalized to other databases.
I have a big table named MessageTable, two columns:
MessageTi