[V4RB] Slow query comparing to v1.1
Stan Busk
maxprog at mac.com
Tue Mar 14 15:56:38 CST 2006
Hi,
The database is 24.7MB
myTable contains 36,000 records.
As I said the same v1 database is much faster on this specific query,
actually you don't even have to wait.
Stan
> On 3/13/06 8:22 PM, "Stan Busk" <maxprog at mac.com> wrote:
>
> Hi Stan,
>
>> 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?
>
> Probably it can be .. I mean optimization.
>
> To get indexes by chars you can simply create Boolean Table Methods
> with
> index.
>
> IT is very strange that it is slower for you, because in V2 LIKE
> and REGEX
> do index scan (if index exists). This can be much faster than Table
> Scan.
>
> Hmm. What size of db?
>
>
> --
> 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]
>
>
> _______________________________________________
> Valentina mailing list
> Valentina at lists.macserve.net
> http://lists.macserve.net/mailman/listinfo/valentina
More information about the Valentina
mailing list