From: | tgl(at)postgresql(dot)org (Tom Lane) |
---|---|
To: | pgsql-committers(at)postgresql(dot)org |
Subject: | pgsql: Remove "fuzzy comparison" logic in qsort comparison function for |
Date: | 2006-06-07 17:08:07 |
Message-ID: | 20060607170807.D77859FA3AD@postgresql.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-committers |
Log Message:
-----------
Remove "fuzzy comparison" logic in qsort comparison function for
choose_bitmap_and(). It was way too fuzzy --- per comment, it was meant to be
1% relative difference, but was actually coded as 0.01 absolute difference,
thus causing selectivities of say 0.001 and 0.000000000001 to be treated as
equal. I believe this thinko explains Maxim Boguk's recent complaint. While
we could change it to a relative test coded like compare_fuzzy_path_costs(),
there's a bigger problem here, which is that any fuzziness at all renders the
comparison function non-transitive, which could confuse qsort() to the point
of delivering completely wrong results. So forget the whole thing and just
do an exact comparison.
Modified Files:
--------------
pgsql/src/backend/optimizer/path:
indxpath.c (r1.207 -> r1.208)
(http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/optimizer/path/indxpath.c.diff?r1=1.207&r2=1.208)
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2006-06-07 17:08:15 | pgsql: Remove "fuzzy comparison" logic in qsort comparison function for |
Previous Message | User Pgstudy | 2006-06-07 17:05:22 | fulldisjunction - fd: Comment out the copyright notice that broke the |