Re: Special meaning of NL string

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Special meaning of NL string
Дата
Msg-id 3250.1144724277@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Special meaning of NL string  ("Vellinga, Fred" <fred.vellinga@nl.verizonbusiness.com>)
Список pgsql-sql
"Vellinga, Fred" <fred.vellinga@nl.verizonbusiness.com> 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 than 'BE' in your table ... the
planner does examine statistics while deciding what sort of scan to use.
        regards, tom lane


В списке pgsql-sql по дате отправления:

Предыдущее
От: FavoYang@gmail.com
Дата:
Сообщение: slow 'IN' clause
Следующее
От: John DeSoi
Дата:
Сообщение: Re: global variables in plpgsql?