LIKE speed
Ruslan Zasukhin
sunshine at public.kherson.ua
Sun Apr 17 09:32:56 CDT 2005
On 4/17/05 8:29 AM, "Kem Tekinay" <ktekinay at mactechnologies.com> wrote:
>> You can download 2.0.3fc1 build and test speed of LIKE again.
>>
>> I very hope that now it will be much faster.
>
> Like lightening. It takes 5 ticks to do a search on City, State or ZIP LIKE
> '%5%4%'. This is down from a second and a half in previous versions.
and
> It is true that LIKE is MUCH faster. As I mentioned in the previous e-mail,
> it now takes about 5 ticks to do a search like '%5%4%'. My question is, why
> does it also take 5 ticks to do a search like '105%' when
> fld.FindStartsWith("105") takes between 0 and 1 ticks?
>
> When LIKE was a problem before this release, I put in code to analyze the
> search string so I could call FindStartsWith, FindEndsWith and FindContains
> rather than FindLike, if possible. In other words, I'd analyze how many and
> where the "%" appeared to call the fastest method. But I feel as though I
> should not have to do that. I should be able to call FindLike at any time
> and have it be just as fast as FindStartsWith, etc.
>
> Am I wrong?
And before:
---------->
>> City, State or Zip LIKE '1%9' (1,508 rows):
>> Valentina: 1.48 secs
>> MySQL: 0.22 secs
>>
>> City, State or Zip LIKE '1%9', order by City:
>> Valentina: 1.45 secs
>> MySQL: 0.22 secs
So now we have 5 ticks. This is 0.08 of second.
In other words, Valentina now do LIKE in
0.22 / 0.08 = 2.75 times faster of mySQL.
Good.
And if we add analyze, we can be even more 5 times faster...
Very good.
--
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