Re: index not used with inherited tables - Mailing list pgsql-novice

From Tom Lane
Subject Re: index not used with inherited tables
Date
Msg-id 24044.1147443113@sss.pgh.pa.us
Whole thread Raw
In response to Re: index not used with inherited tables  (Verena Ruff <lists@triosolutions.at>)
Responses Re: index not used with inherited tables
List pgsql-novice
Verena Ruff <lists@triosolutions.at> writes:
> But I define a new primary key constraint in the child table, using the
> column frm the parent. Shouldn't create this an index implicitly?

Yes, and I'm sure it did.  The more relevant question is how much data
do you have in the child table?  The planner generally won't bother with
an indexscan if the table is only one or two disk pages; trying to use
the index in such cases would end up fetching *more* disk pages overall.

            regards, tom lane

pgsql-novice by date:

Previous
From: Verena Ruff
Date:
Subject: Re: index not used with inherited tables
Next
From: Verena Ruff
Date:
Subject: Re: index not used with inherited tables