[V4RB] Slow query comparing to v1.1

Ruslan Zasukhin sunshine at public.kherson.ua
Tue Mar 14 09:41:00 CST 2006


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]




More information about the Valentina mailing list