Re: Inheritance and indexes

Поиск
Список
Период
Сортировка
От Marti Raudsepp
Тема Re: Inheritance and indexes
Дата
Msg-id CABRT9RASyXyeN2H2ffs-vqPP-LJHeGkuyAKk3wk0hcYt8zOTJQ@mail.gmail.com
обсуждение исходный текст
Ответ на Inheritance and indexes  (knizhnik <knizhnik@garret.ru>)
Список pgsql-hackers
On Tue, Jan 14, 2014 at 12:07 PM, knizhnik <knizhnik@garret.ru> wrote:
> But is it possible to use index for derived table at all?

Yes, the planner will do an index scan when it makes sense.

> Why sequential search is used for derived table in the example below:

> insert into derived_table values (2,2);
> create index derived_index on derived_table(x);
> explain select * from base_table where x>=0;

With only 1 row in the table, the planner decides there's no point in
scanning the index. Try with more realistic data.

Regards,
Marti



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

Предыдущее
От: Marti Raudsepp
Дата:
Сообщение: Re: plpgsql.consistent_into
Следующее
От: Marko Tiikkaja
Дата:
Сообщение: Re: plpgsql.consistent_into