Re: Potential autovacuum optimization: new tables

Поиск
Список
Период
Сортировка
От Josh Berkus
Тема Re: Potential autovacuum optimization: new tables
Дата
Msg-id 5078C0EE.2030107@agliodbs.com
обсуждение исходный текст
Ответ на Potential autovacuum optimization: new tables  (Josh Berkus <josh@agliodbs.com>)
Ответы Re: Potential autovacuum optimization: new tables
Список 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



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

Предыдущее
От: John R Pierce
Дата:
Сообщение: Re: Successor of MD5 authentication, let's use SCRAM
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Potential autovacuum optimization: new tables