Re: Potential autovacuum optimization: new tables

From: Josh Berkus <josh(at)agliodbs(dot)com>
To: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Potential autovacuum optimization: new tables
Date: 2012-10-13 01:16:30
Message-ID: 5078C0EE.2030107@agliodbs.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

All,

> 1. User creates new table
> 2. User inserts 45 records into new table.
> 3. Time passes.
> 4. User creates a query which joins against new table.
> 5. Planner uses estimate of 1000 rows for the new table.
> 6. User gets very bad query plan.

Because Snowman asked me for an example:

Before ANALYZE on the new table:

http://explain.depesz.com/s/36D

After ANALYZE on the new table:

http://explain.depesz.com/s/851t

That's a 25X difference in execution time. This is not the first time
I've seen this issue.

--
Josh Berkus
PostgreSQL Experts Inc.
http://pgexperts.com

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2012-10-13 01:19:29 Re: Potential autovacuum optimization: new tables
Previous Message John R Pierce 2012-10-13 00:42:03 Re: Successor of MD5 authentication, let's use SCRAM