Subject | Re: [firebird-support] Re: Creating index |
---|---|
Author | Ann W. Harrison |
Post date | 2006-02-12T02:02:45Z |
Wei Yu -
If you know that 98% of the records are 'N' and 2% are 'Y', write
queries like this
select x.name from humans x
where x.would_invite_for_dinner = 'N' or
0 = 1
select x.name from humans x
where x.would_invite_for_dinner = 'Y'
The additional or <false> will prevent Firebird from
using the index when it will only slow down processing.
Regards,
Ann
If you know that 98% of the records are 'N' and 2% are 'Y', write
queries like this
select x.name from humans x
where x.would_invite_for_dinner = 'N' or
0 = 1
select x.name from humans x
where x.would_invite_for_dinner = 'Y'
The additional or <false> will prevent Firebird from
using the index when it will only slow down processing.
Regards,
Ann