Speed up SQL
Beatrix Willius
bwillius at gmx.de
Tue Jan 10 10:37:50 CST 2012
Hi Ruslan,
On 10.01.2012, at 16:34, Ruslan Zasukhin wrote:
> Yes, tune info not helps too much ...
> And it seems it loose some operation about
Okay, will try again. I had to copy this line by line!
>
> But I have take look on query again,
> Why you use HAVING to filter records of Message table?
> You can try do this in WHERE clause ?
>
> WHERE
> Message.MessageBody REGEX '(?i)osmer
This is so very fast, I already tried this. But, this won't work for 2 reasons:
- The messagebody isn't part of the listbox that shows the result.
- I've got a second condition for searching attachments, which absolutely can't be part of a where. Or I would get duplicates - I think.
>
> Also keep in mind it is possible specify additional conditions even in the JOIN clauses:
>
> FROM
> Message INNER JOIN Mailbox ON Message.MailboxID = Mailbox.RecID AND Message.MessageBody REGEX '(?i)osmer
I'll have a look at this.
Mit freundlichen Grüßen/Regards
Trixi Willius
http://www.mothsoftware.com
Mail Archiver X: The email archiving solution for professionals
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macserve.net/pipermail/valentina/attachments/20120110/baa70aab/attachment.html>
More information about the Valentina
mailing list