Re: index not used with inherited tables

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Verena Ruff <lists(at)triosolutions(dot)at>
Cc: Sean Davis <sdavis2(at)mail(dot)nih(dot)gov>, pgsql-novice(at)postgresql(dot)org
Subject: Re: index not used with inherited tables
Date: 2006-05-12 14:11:53
Message-ID: 24044.1147443113@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

Verena Ruff <lists(at)triosolutions(dot)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

In response to

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message Verena Ruff 2006-05-12 14:32:00 Re: index not used with inherited tables
Previous Message Verena Ruff 2006-05-12 12:35:34 Re: index not used with inherited tables