Re: [PERFORM] encouraging index-only scans - Mailing list pgsql-hackers

From Claudio Freire
Subject Re: [PERFORM] encouraging index-only scans
Date
Msg-id CAGTBQpZNJx_o=UJjwRYZCSKvsn6T8ou0QdufrQBzFvEBSRTebQ@mail.gmail.com
Whole thread Raw
In response to Re: [PERFORM] encouraging index-only scans  (Jeff Janes <jeff.janes@gmail.com>)
Responses Re: [PERFORM] encouraging index-only scans  (Bruce Momjian <bruce@momjian.us>)
List pgsql-hackers
On Tue, Feb 11, 2014 at 4:13 PM, Jeff Janes <jeff.janes@gmail.com> wrote:
>>
>> Do we want to track the number of inserts in statistics and trigger an
>> auto-vacuum after a specified number of inserts?
>
>
> We track relpages and relallvisible, which seems like a more direct measure.
> Once analyze is done (which is already triggered by inserts) and sets those,
> it could fire a vacuum based on the ratio of those values, or the autovac
> process could just look at the ratio after naptime.  So just introduce
> autovacuum_vacuum_visible_factor. A problem there is that it would be a lot
> of work to aggressively keep the ratio high, and pointless if the types of
> queries done on that table don't benefit from IOS anyway, or if pages are
> dirtied so rapidly that no amount of vacuuming will keep the ratio high.
> Would we try to automatically tell which tables were which, or rely on the
> DBA setting per-table autovacuum_vacuum_visible_factor for tables that
> differ from the database norm?


Why not track how many times an IOS would be used but wasn't, or how
many heap fetches in IOS have to be performed?

Seems like a more direct measure of whether allvisible needs an update.



pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: PostgreSQL Failback without rebuild
Next
From: Marco Atzeri
Date:
Subject: Re: narwhal and PGDLLIMPORT