Are query 1 and query 2 the same in PostgreSQL or different ?? If its different , WHY ??Query 2 : Select * from TABLE where b <10 and a > 5;Query 1 : Select * from TABLE where a > 5 and b < 10;In PostgreSQL , does the order in which the criteria is given matter ?? For exampleHi,
Why are you asking? Do you have any context in which you want to measure "sameness"?
I
was thinking that pg_stat_statements might treat them differently but the comparison there is object based, not string based, so these should end up with the same hash.
If everything is working correctly there will be no observable and persistent difference between executing those exact two queries as far as PostgreSQL is concerned. You might find a difference in the parse tree representation where a > 5 is on the left leaf of a branch in one query but on the right leaf in the other...
David J.