Aaron Stone wrote:
I'm thinking we should go with LIKE.
This is MySQL 4.0.21 on Gentoo Linux on a Pentium III 866.
mysql> SELECT DISTINCT(physmessage_id) FROM dbmail_messageblks WHERE
messageblk LIKE '%From:%Aaron%';
11089 rows in set (31.17 sec) [cpu hovered around 50%]
Could you pelase also benchmark
SELECT DISTINCT(physmessage_id) FROM dbmail_messageblks WHERE
messageblk LIKE '%Aaron%';
I mean, if LIKE is multiline and so we're actually searching for all
messageblks which have "Aaron" *anywhere* after "From:", why bother with
"From:" ?
Of course, until we have is_header, this can sort out some of the false
positives of the non-header type... Some will remain, so we must take
care not to parse them, probably by comparing their messageblk_id's to a
buffered header messageblk_id list for the mailbox.
Yours, Mikhail Ramendik