Re: Question about indexes on tables with inherited children - Mailing list pgsql-general

From Sergey Konoplev
Subject Re: Question about indexes on tables with inherited children
Date
Msg-id AANLkTim_fSIeW_waUU1WOB6vfNCqtMk7vtmEIUKyJT3m@mail.gmail.com
Whole thread Raw
In response to Question about indexes on tables with inherited children  (Bryan Montgomery <monty@english.net>)
List pgsql-general
On 16 June 2010 19:07, Bryan Montgomery <monty@english.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.ru@gmail.com / Skype: gray-hemp / ICQ: 29353802

pgsql-general by date:

Previous
From: stefano bonnin
Date:
Subject: Given N, finding the interval of N hours with max(sum(..))
Next
From: Jacek Trzmiel
Date:
Subject: Wrong number of empty toast pages