Re: Question about indexes on tables with inherited children

From: Sergey Konoplev <gray(dot)ru(at)gmail(dot)com>
To: Bryan Montgomery <monty(at)english(dot)net>
Cc: pgsql-general <pgsql-general(at)postgresql(dot)org>
Subject: Re: Question about indexes on tables with inherited children
Date: 2010-06-17 07:11:00
Message-ID: AANLkTim_fSIeW_waUU1WOB6vfNCqtMk7vtmEIUKyJT3m@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 16 June 2010 19:07, Bryan Montgomery <monty(at)english(dot)net> wrote:
> If I do select * from Table_A a, Table_X x where a.id = x.id
> and it only returns 1 or a few rows, should it use an index if I have an
> index built on Table_A using id?

It should because it scans Table_A too.

> Or do I need an index individually on B & C?

Yes. Indexes are not inherited.

--
Sergey Konoplev

Blog: http://gray-hemp.blogspot.com /
Linkedin: http://ru.linkedin.com/in/grayhemp /
JID/GTalk: gray(dot)ru(at)gmail(dot)com / Skype: gray-hemp / ICQ: 29353802

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Dimitri Fontaine 2010-06-17 08:43:02 Re: hi, i write a function in postgresql source code, how to register this function?
Previous Message Jacek Trzmiel 2010-06-17 07:07:32 Wrong number of empty toast pages