Re: Slow update of indexed column with many nulls

Поиск
Список
Период
Сортировка
От Josh Berkus
Тема Re: Slow update of indexed column with many nulls
Дата
Msg-id 200303231355.02826.josh@agliodbs.com
обсуждение исходный текст
Ответ на Slow update of indexed column with many nulls  (bsamwel@xs4all.nl)
Список pgsql-performance
Bart,

> insert into foo (baz) values (28);
> create index foo_idx on foo(baz);
> vacuum full analyze foo;
>
> Now, we would expect that PostgreSQL is fully aware that there are not
> many rows in foo that have "baz is not null". However:

This is a known issue discussed several times on this list.   Try re-creating
your index as:

create index foo_idx on foo(baz) where foo is not null;

See the list archives for the reasons why.  This may improve in future
releases of PostgreSQL.

--
Josh Berkus
Aglio Database Solutions
San Francisco


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

Предыдущее
От: Stephan Szabo
Дата:
Сообщение: Re: Adding a foreign key constraint is extremely slow
Следующее
От: Oleg Lebedev
Дата:
Сообщение: Slow query