Re: index-only scans

Поиск
Список
Период
Сортировка
От Jim Nasby
Тема Re: index-only scans
Дата
Msg-id 5CF12E25-77E5-42C2-9DCD-0018592B6E41@nasby.net
обсуждение исходный текст
Ответ на Re: index-only scans  (Heikki Linnakangas <heikki.linnakangas@enterprisedb.com>)
Список pgsql-hackers
On Aug 13, 2011, at 4:31 PM, Heikki Linnakangas wrote:
>> The example is much more realistic if the query is a fetch of N latest rows from a table. Very common use case, and
thewhole relation's visibility statistics are completely wrong for that query. 
>
> That is somewhat compensated by the fact that tuples that are accessed more often are also more likely to be in
cache.Fetching the heap tuple to check visibility is very cheap when the tuple is in cache. 
>
> I'm not sure how far that compensates it, though. I'm sure there's typically nevertheless a fairly wide range of
pagesthat have been modified since the last vacuum, but not in cache anymore. 

http://xkcd.org/937/ :)

Could something be added to pg_stats that tracks visibility map usefulness on a per-attribute basis? Perhaps another
setof stats buckets that show visibility percentages for each stats bucket? 
--
Jim C. Nasby, Database Architect                   jim@nasby.net
512.569.9461 (cell)                         http://jim.nasby.net




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

Предыдущее
От: Dimitri Fontaine
Дата:
Сообщение: Re: walprotocol.h vs frontends
Следующее
От: Simon Riggs
Дата:
Сообщение: Re: walprotocol.h vs frontends