I did try it and it worked fine. Slightly faster.

 Also there is no reason for the group by because the query isstructured
so that there is always 1 result, unless there are really multiple
identical messageblks for the same message.

I tried it on a mailbox without that many messages, just for testing
purposes. The first test took a lot longer, because it was not cached.
After that, the query without the group and with the encode in the where
clause took 4.5 seconds while the existing one took 6.5 seconds.

I am in the middle of looking at full text indexing and I'll let the
list know what I find out.

Sim

Paul J Stevens wrote:
> Sim Zacks wrote:
> 
>> 2) Wouldn't the query be much faster if the
>> ENCODE(k.messageblk::bytea,'escape') LIKE '%sim%' was in the WHERE
>> clause instead of the HAVING clause?
> 
> Try it. Afaik, it simply wont work.
> 
>> 3) Does anybody have imap search working on some reasonable level?
> 
> Very good question. The only solution I can think of is full text indexing.
> 
> 
_______________________________________________
DBmail mailing list
[email protected]
https://mailman.fastxs.nl/mailman/listinfo/dbmail

Reply via email to