Re: index creation order?

Поиск
Список
Период
Сортировка
От Josh Berkus
Тема Re: index creation order?
Дата
Msg-id 200310311058.19455.josh@agliodbs.com
обсуждение исходный текст
Ответ на Re: index creation order?  (Allen Landsidel <all@biosys.net>)
Ответы Re: index creation order?  (Chester Kustarz <chester@arbor.net>)
Список pgsql-performance
Allen,

> I had no idea analyze was playing such a big role in this sense.. I really
> thought that other than saving space, it wasn't doing much for tables that
> don't have indexes on the.

Among other things, ANALYZE tells postgres how many rows are in the table.  So
if you add a PK constraint after loading 10 million rows without ANALYZE,
PostgreSQL is likely to think that there is only one row in the table ... and
choose a nested loop or some other really inefficient method of checking for
uniqueness.

--
Josh Berkus
Aglio Database Solutions
San Francisco

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

Предыдущее
От: Neil Conway
Дата:
Сообщение: Re: Pg+Linux swap use
Следующее
От: Allen Landsidel
Дата:
Сообщение: Re: index creation order?