[EMAIL PROTECTED] writes: > On Tue, 9 Dec 2008, Tom Lane wrote: >> Hmm, so the problem is in that second loop. The trick is to pick some >> reasonably non-ugly code change that makes the problem go away.
> I tried that and moving leftok,rightok declaration outside the loop, and > refactor the assignement code of leftok, rightok . nothing worked! I was afraid of that. We'd need to look at the assembly code to be sure (can you provide it?), but what I bet is happening is that the compiler is looking at the leftnodeno/rightnodeno computations and thinking it can optimize those by a strength-reduction method, failing to notice that the loop isn't a simple scan on nodeno. Now in that regard the logic isn't very much different from a binary search, which we have lots of and those have always worked. So I'm back to the theory that the goto inside the inner loop is probably contributing to the confusion somehow. regards, tom lane -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers