indexes and inheritance

Поиск
Список
Период
Сортировка
От Edwin Grubbs
Тема indexes and inheritance
Дата
Msg-id Pine.LNX.4.30.0106201513310.19989-100000@zamboni.wc6.rackspace.com
обсуждение исходный текст
Список pgsql-general
I have been unable to get indexes to be used when selecting from a parent
table. I have tried running VACUUM ANALYZE and looking through the
documentation, and the indexes are used fine if I select from a single
table.

Example:

create table parent (name text);
create table child (age int4) inherits (parent);
create index parent_index on parent (name);
create index child_index on child (name);

.. fill with data ..

This select will not use the index for the "name" column:

SELECT *
FROM parent*
WHERE name = 'bob';

But if I replace "parent*" with "parent" or "child", this query uses the
appropriate index.

-Edwin



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