From: | Bruce Momjian <bruce(at)momjian(dot)us> |
---|---|
To: | Claudio Freire <klaussfreire(at)gmail(dot)com> |
Cc: | Jeff Janes <jeff(dot)janes(at)gmail(dot)com>, Robert Haas <robertmhaas(at)gmail(dot)com>, Andres Freund <andres(at)2ndquadrant(dot)com>, Jim Nasby <jim(at)nasby(dot)net>, Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>, Peter Geoghegan <peter(at)2ndquadrant(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Andrew Dunstan <andrew(at)dunslane(dot)net>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: [PERFORM] encouraging index-only scans |
Date: | 2014-02-11 22:40:14 |
Message-ID: | 20140211224014.GL2289@momjian.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers pgsql-performance |
On Tue, Feb 11, 2014 at 05:51:36PM -0200, Claudio Freire wrote:
> > 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.
Now that is in interesting idea, and more direct.
Do we need to adjust for the insert count, i.e. would the threadhold to
trigger an autovacuum after finding index lookups that had to check the
heap page for visibility be higher if many inserts are happening,
perhaps dirtying pages? (If we are dirtying via update/delete,
autovacuum will already trigger.)
We are aggressive in clearing the page-all-visible flag (we have to be),
but I think we need a little more aggressiveness for setting it.
--
Bruce Momjian <bruce(at)momjian(dot)us> http://momjian.us
EnterpriseDB http://enterprisedb.com
+ Everyone has their own god. +
From | Date | Subject | |
---|---|---|---|
Next Message | Bruce Momjian | 2014-02-11 22:58:06 | Re: Small GIN optimizations (after 9.4) |
Previous Message | Alvaro Herrera | 2014-02-11 22:16:32 | Re: truncating pg_multixact/members |
From | Date | Subject | |
---|---|---|---|
Next Message | Jeff Janes | 2014-02-11 23:29:45 | Re: Bloated tables and why is vacuum full the only option |
Previous Message | Claudio Freire | 2014-02-11 20:58:03 | Re: list number of entries to be delete in cascading deletes |