Subject | Re: can someone explain me |
---|---|
Author | svanderclock |
Post date | 2009-06-24T20:44:30Z |
no, starting 'R' or like 'R%' is the same number of indexed read.
but why the like 'R%' gave so much of indexed read (500 000 indexed read when their is only 250 000 record that start with R)? internally what exactly the engine do to find the record (we know that she use the index, but very badly)
is it a "lake" in firebird index engine ?
thanks you by advance
stéphane
but why the like 'R%' gave so much of indexed read (500 000 indexed read when their is only 250 000 record that start with R)? internally what exactly the engine do to find the record (we know that she use the index, but very badly)
is it a "lake" in firebird index engine ?
thanks you by advance
stéphane
--- In firebird-support@yahoogroups.com, Lester Caine <lester@...> wrote:
>
> svanderclock wrote:
> >> FROM GEO_PLACE
> >> WHERE
> >> ID like 'R%'
> >>
> >> geo_place
> >> indexed read: 542167
> >> non indexed read: 0
>
> I'm not sure that I would expect anything different?
> LIKE asks to check for any record LIKE the supplied filter. The fact
> that IN THIS CASE the results could be filtered by the first letter of
> the filter and could possibly then use the index selectively is just a
> special case?
> Personally I would be looking to either match the ID ( as in your first
> case), or provide an additional filter to limit the number of records to
> be compared. How does ID STARTING 'R' do in this case?
>
> --
> Lester Caine - G8HFL
> -----------------------------
> Contact - http://lsces.co.uk/wiki/?page=contact
> L.S.Caine Electronic Services - http://lsces.co.uk
> EnquirySolve - http://enquirysolve.com/
> Model Engineers Digital Workshop - http://medw.co.uk//
> Firebird - http://www.firebirdsql.org/index.php
>