From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | "Ian Cass" <ian(dot)cass(at)mblox(dot)com> |
Cc: | pgsql-sql(at)postgresql(dot)org |
Subject: | Re: JOINS and non use of indexes |
Date: | 2002-04-08 15:21:57 |
Message-ID: | 21034.1018279317@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-sql |
"Ian Cass" <ian(dot)cass(at)mblox(dot)com> writes:
>> The planner isn't smart about
>> indexscan-based joins for inheritance trees. This could possibly be
>> improved with some work, but I haven't thought about the details.
> Is there any way I could 'educate' it by using more explicit sql, or do I
> have to abandon the idea of using inheritance altogether?
You'd have to spell out the join for each member of the inheritance
tree:
SELECT ... FROM outside, inside_1 WHERE ...
UNION ALL
SELECT ... FROM outside, inside_2 WHERE ...
UNION ALL
SELECT ... FROM outside, inside_3 WHERE ...
which is just about as bad as not using inheritance :-(
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Søren Vainio | 2002-04-09 08:51:33 | Scadinavian characters in regular expressions |
Previous Message | Ian Cass | 2002-04-08 15:16:29 | Re: JOINS and non use of indexes |