1
0
mirror of https://github.com/postgres/postgres.git synced 2025-11-10 17:42:29 +03:00

Major optimizer improvement for joining a large number of tables.

This commit is contained in:
Bruce Momjian
1999-02-09 03:51:42 +00:00
parent be948af2e8
commit fe35ffe7e0
21 changed files with 277 additions and 139 deletions

View File

@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/nodes/equalfuncs.c,v 1.26 1999/02/08 04:29:04 momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/nodes/equalfuncs.c,v 1.27 1999/02/09 03:51:12 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -337,33 +337,33 @@ _equalPath(Path *a, Path *b)
/*
* if (a->path_cost != b->path_cost) return(false);
*/
if (a->path_order.ordtype == SORTOP_ORDER)
if (a->path_order->ordtype == SORTOP_ORDER)
{
int i = 0;
if (a->path_order.ord.sortop == NULL ||
b->path_order.ord.sortop == NULL)
if (a->path_order->ord.sortop == NULL ||
b->path_order->ord.sortop == NULL)
{
if (a->path_order.ord.sortop != b->path_order.ord.sortop)
if (a->path_order->ord.sortop != b->path_order->ord.sortop)
return false;
}
else
{
while (a->path_order.ord.sortop[i] != 0 &&
b->path_order.ord.sortop[i] != 0)
while (a->path_order->ord.sortop[i] != 0 &&
b->path_order->ord.sortop[i] != 0)
{
if (a->path_order.ord.sortop[i] != b->path_order.ord.sortop[i])
if (a->path_order->ord.sortop[i] != b->path_order->ord.sortop[i])
return false;
i++;
}
if (a->path_order.ord.sortop[i] != 0 ||
b->path_order.ord.sortop[i] != 0)
if (a->path_order->ord.sortop[i] != 0 ||
b->path_order->ord.sortop[i] != 0)
return false;
}
}
else
{
if (!equal(a->path_order.ord.merge, b->path_order.ord.merge))
if (!equal(a->path_order->ord.merge, b->path_order->ord.merge))
return false;
}
if (!equal(a->keys, b->keys))
@@ -433,9 +433,9 @@ _equalHashPath(HashPath *a, HashPath *b)
return false;
if (!equal((a->path_hashclauses), (b->path_hashclauses)))
return false;
if (!equal((a->outerhashkeys), (b->outerhashkeys)))
if (!equal(a->outerhashkeys, b->outerhashkeys))
return false;
if (!equal((a->innerhashkeys), (b->innerhashkeys)))
if (!equal(a->innerhashkeys, b->innerhashkeys))
return false;
return true;
}