Re: [SQL] Special meaning of NL string

2006-04-17 Thread Vellinga, Fred
Title: RE: [SQL] Special meaning of NL string Tom, Thanks for your answer. The problem is indeed related to the statistics. The isssue now seems to find out why the statistics are 'incorrect' every day. My gues is the following: we run every night the command VACUUM ANALYZE. Th

Re: [SQL] Special meaning of NL string

2006-04-10 Thread Tom Lane
"Vellinga, Fred" <[EMAIL PROTECTED]> writes: > 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. Probably, 'NL' is a lot more common tha

[SQL] Special meaning of NL string

2006-04-10 Thread Vellinga, Fred
Title: Message 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   SELEC