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 14:46:08 |
Message-ID: | 20623.1018277168@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:
> I'm transferring a database & reporting scripts across from Oracle & a few
> of the SQL statements behave a little differently with regards to indexes.
> The one that's got me stumped at the moment is this...
> select * from messages, statusinds
> WHERE statusinds.gateway_id = messages.gateway_id
> AND (messages.client_id = '7' AND messages.user_name in ('U66515'))
> limit 5;
> (tables_YYYYMM are inherited)
There's your problem (and don't tell me Oracle gets this right; they
don't do inheritance, do they?). 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.
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Ian Cass | 2002-04-08 15:12:36 | Re: JOINS and non use of indexes |
Previous Message | Ian Cass | 2002-04-08 14:41:48 | Re: JOINS and non use of indexes |