indexes and inheritance - Mailing list pgsql-general

From Edwin Grubbs
Subject indexes and inheritance
Date
Msg-id Pine.LNX.4.30.0106201513310.19989-100000@zamboni.wc6.rackspace.com
Whole thread Raw
List 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 by date:

Previous
From: "Gregory S. Youngblood"
Date:
Subject: Problems with pgsql 7.1.2 and ExecEvalExpr
Next
From: "Norman J. Clarke"
Date:
Subject: Re: Red Hat Database