Robert Haas <robertmh...@gmail.com> writes: > SELECT d1.ID, d2.ID > FROM DocPrimary d1 > JOIN DocPrimary d2 ON d2.BasedOn=d1.ID > WHERE (d1.ID=234409763) or (d2.ID=234409763) > > ...you're going to scan d1, scan d2, and then join the results. The > scan of d1 is going to produce different results depending on whether > you evaluate or not d1.ID=234409763, and the scan of d2 is going to > produce different results depending on whether or not you evaluate > d2.BasedOn=234409763.
Well I just realised you can't use d2.BasedOn in scanning d1 here. I don't know what exactly I had in mind previously, but in any case, sorry for the noise. I hope the optimiser effort control still hold water nonetheless… -- dim -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers