[V4RB] Slow query comparing to v1.1

Ruslan Zasukhin sunshine at public.kherson.ua
Tue Mar 14 09:26:49 CST 2006


On 3/13/06 9:09 PM, "Claudius Sailer" <Claudius at sailer-online.de> wrote:

>> In a project I use the following SQL query many times at startup:
>> 
>> SELECT Count(*)
>> FROM myTable
>> WHERE myField LIKE '%Q%'
>> AND myField LIKE '%U%'
>> AND myField NOT LIKE '%D%'
>> 
>> Well, it is slow as a crawl. myField is an indexed VvarChar
>> (EVFlag.fIndexed). It takes 15 seconds to perform when it was
>> almost instantaneous with Valentina v1. myField contains a group of
>> 6 (up to 32) letters with no spaces to keep track of statuses.
>> 
>> My question is, can this be optimized? or should I use now 6 (up to
>> 32) boolean fields to replace that design? I guess the best would
>> be a new EVFlag.fIndexedByChars modifier. Could it be possible?
> 
> INHO
> could be RegEx faster?
> 
> I am not very frim with RegEx, but isn't it possible to take all in
> one statement?

No, RegEx is slower of LIKE because it should do more complex tasks.

-- 
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