mirror of
https://github.com/postgres/postgres.git
synced 2025-11-19 13:42:17 +03:00
First cut at doing something reasonable with OR-of-ANDs WHERE
conditions. There are some pretty bogus heuristics in prepqual.c that try to decide whether to output CNF or DNF format; they need to be replaced, likely. Right now the code is probably too willing to choose DNF form, which might hurt performance in some cases that used to work OK. But at least we have a foundation to build on.
This commit is contained in:
@@ -7,7 +7,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/optimizer/plan/planmain.c,v 1.43 1999/08/22 23:56:45 tgl Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/optimizer/plan/planmain.c,v 1.44 1999/09/13 00:17:25 tgl Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -75,9 +75,9 @@ query_planner(Query *root,
|
||||
if (root->hasSubLinks)
|
||||
qual = (List *) SS_process_sublinks((Node *) qual);
|
||||
|
||||
qual = cnfify((Expr *) qual, true);
|
||||
qual = canonicalize_qual((Expr *) qual, true);
|
||||
#ifdef OPTIMIZER_DEBUG
|
||||
printf("After cnfify()\n");
|
||||
printf("After canonicalize_qual()\n");
|
||||
pprint(qual);
|
||||
#endif
|
||||
|
||||
|
||||
Reference in New Issue
Block a user