From: | Greg Stark <gsstark(at)mit(dot)edu> |
---|---|
To: | pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: [SQL] "SELECT IN" Still Broken in 7.4b |
Date: | 2003-08-22 15:28:55 |
Message-ID: | 87k795iudk.fsf@stark.dyndns.tv |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers pgsql-sql |
Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> writes:
> Finally, I suspect that once we get rid of the O(N^2) behavior in the
> executor, we will find that the next biggest bottleneck is in the
> planner; adding more work for it to do per OR-clause item will make
> things worse not better.
But time spent in the planner doesn't matter if you're using prepared queries
which is true for OLTP applications where there are very few queries being
executed many many times. I hear web sites are quite popular these days.
I missed the beginning of this thread so I'm not sure if it's relevant. But
wouldn't it be possible to just check if all the clauses and see if they're
using precisely the same index with an equality type operator? That won't
catch things like "a BETWEEN 1 AND 2 OR a BETWEEN 5 AND 6" but it will catch
things like "a IN (1,2,3,4,5,6)". And I don't see how it wouldn't be linear
in the number of clauses.
--
greg
From | Date | Subject | |
---|---|---|---|
Next Message | Claudio Lapidus | 2003-08-22 15:35:50 | Re: Buglist |
Previous Message | Shridhar Daithankar | 2003-08-22 15:17:54 | Re: [HACKERS] Buglist |
From | Date | Subject | |
---|---|---|---|
Next Message | Stephan Szabo | 2003-08-22 15:47:30 | Re: [SQL] "SELECT IN" Still Broken in 7.4b |
Previous Message | Shridhar Daithankar | 2003-08-22 15:11:25 | Re: [SQL] "SELECT IN" Still Broken in 7.4b |