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 -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers