-
- KSQO (boolean)
-
- The Key Set Query Optimizer
- (
KSQO) causes the query planner to convert
- queries whose WHERE> clause contains many OR'ed AND
- clauses (such as WHERE (a=1 AND b=2) OR (a=2 AND b=3)
- ...) into a union query. This method can be faster
- than the default implementation, but it doesn't necessarily give
- exactly the same results, since UNION> implicitly
- adds a SELECT DISTINCT> clause to eliminate identical
- output rows.
KSQO is commonly used when
- working with products like
Microsoft
- Access, which tend to generate queries of this
- form.
-
-
- The
KSQO algorithm used to be absolutely
- essential for queries with many OR'ed AND clauses, but in
-
PostgreSQL 7.0 and later the standard
- planner handles these queries fairly successfully; hence the
- default is off.
-
-
-
-
RANDOM_PAGE_COST (floating point)
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/optimizer/plan/planner.c,v 1.120 2002/06/13 15:10:25 tgl Exp $
+ * $Header: /cvsroot/pgsql/src/backend/optimizer/plan/planner.c,v 1.121 2002/06/16 00:09:11 momjian Exp $
*
*-------------------------------------------------------------------------
*/
PlannerQueryLevel++;
PlannerInitPlan = NIL;
-#ifdef ENABLE_KEY_SET_QUERY
- /* this should go away sometime soon */
- transformKeySetQuery(parse);
-#endif
-
/*
* Check to see if any subqueries in the rangetable can be merged into
* this query.
# Makefile for optimizer/prep
#
# IDENTIFICATION
-# $Header: /cvsroot/pgsql/src/backend/optimizer/prep/Makefile,v 1.12 2000/08/31 16:10:13 petere Exp $
+# $Header: /cvsroot/pgsql/src/backend/optimizer/prep/Makefile,v 1.13 2002/06/16 00:09:11 momjian Exp $
#
#-------------------------------------------------------------------------
top_builddir = ../../../..
include $(top_builddir)/src/Makefile.global
-OBJS = prepqual.o preptlist.o prepunion.o prepkeyset.o
+OBJS = prepqual.o preptlist.o prepunion.o
all: SUBSYS.o
*
*-------------------------------------------------------------------------
*/
-
+
+/* THIS FILE WAS USED FOR KSQO, WHICH IS DISABLED NOW. bjm 2002-06-15 */
+
#include "postgres.h"
#include "optimizer/planmain.h"
* command, configuration file, and command line options.
* See src/backend/utils/misc/README for more information.
*
- * $Header: /cvsroot/pgsql/src/backend/utils/misc/guc.c,v 1.69 2002/05/17 20:32:29 tgl Exp $
+ * $Header: /cvsroot/pgsql/src/backend/utils/misc/guc.c,v 1.70 2002/06/16 00:09:12 momjian Exp $
*
* Copyright 2000 by PostgreSQL Global Development Group
* Written by Peter Eisentraut
.
{ "enable_hashjoin", PGC_USERSET }, &enable_hashjoin,
true, NULL, NULL
},
-
- {
- { "ksqo", PGC_USERSET }, &_use_keyset_query_optimizer,
- false, NULL, NULL
- },
{
{ "geqo", PGC_USERSET }, &enable_geqo,
true, NULL, NULL
#enable_mergejoin = true
#enable_hashjoin = true
-#ksqo = false
-
#effective_cache_size = 1000 # default in 8k pages
#random_page_cost = 4
#cpu_tuple_cost = 0.01
*
* Copyright 2000 by PostgreSQL Global Development Group
*
- * $Header: /cvsroot/pgsql/src/bin/psql/tab-complete.c,v 1.49 2002/06/15 19:43:47 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/bin/psql/tab-complete.c,v 1.50 2002/06/16 00:09:12 momjian Exp $
*/
/*----------------------------------------------------------------------
"enable_nestloop",
"enable_mergejoin",
"enable_hashjoin",
- "ksqo",
"geqo",
"fsync",
"server_min_messages",
COMPLETE_WITH_LIST(my_list);
}
- else if (strcasecmp(prev2_wd, "GEQO") == 0 || strcasecmp(prev2_wd, "KSQO") == 0)
+ else if (strcasecmp(prev2_wd, "GEQO") == 0)
{
char *my_list[] = {"ON", "OFF", "DEFAULT", NULL};
* Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $Id: planmain.h,v 1.57 2002/05/18 02:25:50 tgl Exp $
+ * $Id: planmain.h,v 1.58 2002/06/16 00:09:12 momjian Exp $
*
*-------------------------------------------------------------------------
*/
Index acceptable_rel);
extern void fix_opids(Node *node);
-/*
- * prep/prepkeyset.c
- */
-extern bool _use_keyset_query_optimizer;
-
-extern void transformKeySetQuery(Query *origNode);
-
#endif /* PLANMAIN_H */