Subject | Re: [firebird-support] Table Scans and != |
---|---|
Author | Helen Borrie |
Post date | 2003-08-04T23:34:11Z |
At 04:19 PM 4/08/2003 -0700, you wrote:
SELECT * FROM SomeTable WHERE triState < 2 ;
I hope you don't have triState indexed!
h.
>Is it pretty common knowledge that != on a field always does a tableYup, that's a correct use of the IN(..) predicate.
>scan?
>
>
>For example, it seems better to do this:
>
> SELECT * FROM SomeTable WHERE triState IN ( 0, 1 );
>Than it is to do:This might be faster:
>
> SELECT * FROM SomeTable WHERE triState != 2;
>
>Anyway, my queries are a lot faster now that I moved to the first form.
SELECT * FROM SomeTable WHERE triState < 2 ;
I hope you don't have triState indexed!
h.