Selectivity estimation for equality and range queries

Поиск
Список
Период
Сортировка
От Peter Eisentraut
Тема Selectivity estimation for equality and range queries
Дата
Msg-id 200712281155.12674.peter_e@gmx.net
обсуждение исходный текст
Ответы Re: Selectivity estimation for equality and range queries  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
I have been observing a case where the row count estimation for LIKE 'foo' is 
(much) higher than for LIKE 'foo%', the rest of the query being the same.  
This is a special case of the estimation for equality being higher than for a 
range query that includes the value used in the equality.

I haven't been able to get a copy of the data from the client yet, but 
considering the nature of the data and the description of the selectivity 
estimation algorithms 
(http://www.postgresql.org/docs/8.3/static/row-estimation-examples.html), 
this behavior appears to be mathematically plausible.  I have been wondering 
whether in general the eqsel should try to compare its result with the 
estimation of (x >= 'foo' AND x <= 'foo') and use that as a ceiling or 
something.

Has anyone else observed something similar?

-- 
Peter Eisentraut
http://developer.postgresql.org/~petere/


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

Предыдущее
От: Andrew Dunstan
Дата:
Сообщение: Re: Binary data type with other output method
Следующее
От: Greg Smith
Дата:
Сообщение: Re: Spoofing as the postmaster