git.postgresql.org Git - postgresql.git/commitdiff

git projects / postgresql.git / commitdiff
? search:
summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 1fcd4b7)
Avoid rechecking lossy operators twice in a bitmap scan plan.
2005年4月25日 04:27:12 +0000 (04:27 +0000)
2005年4月25日 04:27:12 +0000 (04:27 +0000)

diff --git a/src/backend/optimizer/plan/createplan.c b/src/backend/optimizer/plan/createplan.c
index 3feff40423fffe8008a3b3e1c5a4ea278add8f18..e042468c6654199d1318ecc1ed828746f9726c9d 100644 (file)
--- a/src/backend/optimizer/plan/createplan.c
+++ b/src/backend/optimizer/plan/createplan.c
@@ -10,7 +10,7 @@
*
*
* IDENTIFICATION
- * $PostgreSQL: pgsql/src/backend/optimizer/plan/createplan.c,v 1.187 2005年04月25日 03:58:30 tgl Exp $
+ * $PostgreSQL: pgsql/src/backend/optimizer/plan/createplan.c,v 1.188 2005年04月25日 04:27:12 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -889,6 +889,14 @@ create_bitmap_scan_plan(Query *root,
/* Sort clauses into best execution order */
qpqual = order_qual_clauses(root, qpqual);
+ /*
+ * When dealing with special or lossy operators, we will at this point
+ * have duplicate clauses in qpqual and bitmapqualorig. We may as well
+ * drop 'em from bitmapqualorig, since there's no point in making the
+ * tests twice.
+ */
+ bitmapqualorig = list_difference_ptr(bitmapqualorig, qpqual);
+
/* Finally ready to build the plan node */
scan_plan = make_bitmap_heapscan(tlist,
qpqual,
This is the main PostgreSQL git repository.
RSS Atom

AltStyle によって変換されたページ (->オリジナル) /