Re: Index isn't used during a join.
От | Tom Lane |
---|---|
Тема | Re: Index isn't used during a join. |
Дата | |
Msg-id | 12877.1136993583@sss.pgh.pa.us обсуждение исходный текст |
Ответ на | Re: Index isn't used during a join. (Robert Creager <Robert_Creager@LogicalChaos.org>) |
Ответы |
Re: Index isn't used during a join.
|
Список | pgsql-performance |
Robert Creager <Robert_Creager@LogicalChaos.org> writes: > What I had thought is that PG would (could?) be smart enough to realize tha= > t one query was restricted, and apply that restriction to the other based o= > n the join. I know it works in other cases (using indexes on both tables u= > sing the join)... The planner understands about transitivity of equality, ie given a = b and b = c it can infer a = c. It doesn't do any such thing for inequalities though, nor does it deduce f(a) = f(b) for arbitrary functions f. The addition Michael suggested requires much more understanding of the properties of the functions in your query than I think would be reasonable to put into the planner. regards, tom lane
В списке pgsql-performance по дате отправления: