Hello,
I wonder if there is an issue with the string 'NL'. In my application NL
stands for Netherlands and is thus a country code abreviation.
The query
SELECT COUNT(*) FROM Table WHERE Field1 = 'NL' OR Field2 = 'NL'
does a sequence scan instead of an index scan, and is thus very slow. If I
replace NL by BE (Belgium) the query does an index scan. If I replace OR by
AND it also does an index scan. So apparently the string NL in the OR Where
clause decides the query planner not to execute an index scan. The database
encoding schema is SQL_ASCII.
Thanks,
Fred Vellinga