Search Postgresql Archives

Operator COMMUTATOR - how does postgresql use this information

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Does PostgreSQL use the COMMUTATOR property of an operator to determine if flip-flopped arguments can be collapsed.
 
I used to think it did until someone pointed it doesn't  - For example in the below
 
SELECT b.*
FROM boszip b INNER JOIN landparcels l
ON (b.the_geom && l.the_geom  AND l.the_geom && b.the_geom AND l.the_geom && b.the_geom )
WHERE l.gid = b.gid and b.gid = l.gid
limit 1
 
 
If I look at the query plan - I see the plan has reduced things down to
 
l.gid = b.gid  AND (b.the_geom && l.the_geom  AND l.the_geom && b.the_geom)
 
Why is (b.the_geom && l.the_geom  AND l.the_geom && b.the_geom)  not reduced down to just
 
b.the_geom && l.the_geom 
 
even though && is defined as the commutator of &&?
 
Thanks,
Regina
 
 


The substance of this message, including any attachments, may be confidential, legally privileged and/or exempt from disclosure pursuant to Massachusetts law. It is intended solely for the addressee. If you received this in error, please contact the sender and delete the material from any computer.


Help make the earth a greener place. If at all possible resist printing this email and join us in saving paper.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux