WHERE order - Mailing list pgsql-hackers

From Rod Taylor
Subject WHERE order
Date
Msg-id 1061920428.4370.25.camel@jester
Whole thread Raw
Responses Re: WHERE order
List pgsql-hackers
It would appear that in 7.4 the order of clauses in WHERE affects the
execution time (not output if AND).

I would think that a simple optimization would be to push off evaluation
of a subplan whenever possible by re-arranging AND statements.

In the below example, it gives an order of magnitude speed increase on a
small dataset.



Attachment

pgsql-hackers by date:

Previous
From: "Jenny -"
Date:
Subject: Re: table-level and row-level locks.
Next
From: Alvaro Herrera Munoz
Date:
Subject: Re: Date input changed in 7.4 ?