Re: Bitmap scans vs. the statistics views

Поиск
Список
Период
Сортировка
От Jan Wieck
Тема Re: Bitmap scans vs. the statistics views
Дата
Msg-id 4269601A.7000400@Yahoo.com
обсуждение исходный текст
Ответ на Re: Bitmap scans vs. the statistics views  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: Bitmap scans vs. the statistics views  (Josh Berkus <josh@agliodbs.com>)
Re: Bitmap scans vs. the statistics views  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
On 4/22/2005 3:53 PM, Tom Lane wrote:

> Jan Wieck <JanWieck@Yahoo.com> writes:
>> tuples fetched is the number of raw, possibly dead tuples fetched from 
>> the heap. Tuples returned is the number of alive tuples ... IIRC.
> 
> No, count_heap_fetch only counts tuples that have already passed the
> snapshot test.  It could be that the places where the counts are
> actually bumped don't line up with your original vision for the
> stats design.
> 
> For a regular index scan, it seems to make sense to count (a) number of
> TIDs returned by the index AM, and (b) number of tuples returned by the
> IndexScan node.  There are several intermediate steps
>     * does the tuple pass the snapshot test
>     * does the tuple pass any indexqual rechecks (for lossy indexes)
>     * does the tuple pass any additional non-index restriction
>       conditions that are being enforced at the scan level

Now that you say it ... yes. The whole stats stuff was intended 
originally to find "DB tuning hints". A large number of tuples returned 
by index scan and filtered out by additional non-index restrictions 
indicate that there might be another multicolumn index missing.


Jan

-- 
#======================================================================#
# It's easier to get forgiveness for being wrong than for being right. #
# Let's break this rule - forgive me.                                  #
#================================================== JanWieck@Yahoo.com #


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

Предыдущее
От: "Dave Held"
Дата:
Сообщение: Re: Woo hoo ... a whole new set of compiler headaches!! :)
Следующее
От: Josh Berkus
Дата:
Сообщение: Re: Bitmap scans vs. the statistics views