Stan, I have found interesting solution for you.

Ruslan Zasukhin sunshine at public.kherson.ua
Sun Jul 16 21:34:25 CDT 2006


> 3) I have made Export/Import of field Article_Newsgroup into new v1
> database. To see how much take v1
> 
>     v1 takes on this data and query   0.02 second.
>     v2 now takes                      0.10 sec on default.
>     v2 with disabled ICU collator     0.05 sec on default.

So having v1 you have LIKE searches of kind

SELECT Article_Newsgroups
FROM tblArticle 
WHERE Article_Newsgroups LIKE '%,alt.comp.shareware,%'

In 0.02 second.

I have found for your database query kind which do answer 10 times faster!
In 0.002 second

Here it is:

SELECT Article_Newsgroups
FROM tblArticle 
WHERE Article_Newsgroups = 'alt.comp.shareware'


Idea is:

    * you have field Article_Newsgroups Indexed By Words.
        this flag prevent ability for LIKE do scan INDEX.
        So LIKE do SCAN of the whole column.

    * when I have realize this, I have to see that
        why you do LIKE %xxxx% which is kind of CONTAINS
        if you can simply for fld = 'xxx'

You have build LIST where group names are separated by COMAS.
So Valentina split your lists EXACTLY by names of groups.
What a good luck :-)


Okay, try this TIP, and I hope to hear from you now back:

    WOW, my app have become 10 times faster than it was with 1.x  :-))



RESUME for all:

    PAY A LOTS of attention to
    a) db design 
    b) indexes 

Very often it is possible improve design and queries to make them work
faster in tens times!


-- 
Best regards,

Ruslan Zasukhin
VP Engineering and New Technology
Paradigma Software, Inc

Valentina - Joining Worlds of Information
http://www.paradigmasoft.com

[I feel the need: the need for speed]




More information about the Valentina mailing list