mirror of
https://github.com/postgres/postgres.git
synced 2025-07-02 09:02:37 +03:00
Rethink original decision to use AND/OR Expr nodes to represent bitmap
logic operations during planning. Seems cleaner to create two new Path node types, instead --- this avoids duplication of cost-estimation code. Also, create an enable_bitmapscan GUC parameter to control use of bitmap plans.
This commit is contained in:
@ -8,7 +8,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $PostgreSQL: pgsql/src/backend/nodes/outfuncs.c,v 1.248 2005/04/21 02:28:01 tgl Exp $
|
||||
* $PostgreSQL: pgsql/src/backend/nodes/outfuncs.c,v 1.249 2005/04/21 19:18:12 tgl Exp $
|
||||
*
|
||||
* NOTES
|
||||
* Every node type that can appear in stored rules' parsetrees *must*
|
||||
@ -1041,6 +1041,28 @@ _outBitmapHeapPath(StringInfo str, BitmapHeapPath *node)
|
||||
WRITE_FLOAT_FIELD(rows, "%.0f");
|
||||
}
|
||||
|
||||
static void
|
||||
_outBitmapAndPath(StringInfo str, BitmapAndPath *node)
|
||||
{
|
||||
WRITE_NODE_TYPE("BITMAPANDPATH");
|
||||
|
||||
_outPathInfo(str, (Path *) node);
|
||||
|
||||
WRITE_NODE_FIELD(bitmapquals);
|
||||
WRITE_FLOAT_FIELD(bitmapselectivity, "%.4f");
|
||||
}
|
||||
|
||||
static void
|
||||
_outBitmapOrPath(StringInfo str, BitmapOrPath *node)
|
||||
{
|
||||
WRITE_NODE_TYPE("BITMAPORPATH");
|
||||
|
||||
_outPathInfo(str, (Path *) node);
|
||||
|
||||
WRITE_NODE_FIELD(bitmapquals);
|
||||
WRITE_FLOAT_FIELD(bitmapselectivity, "%.4f");
|
||||
}
|
||||
|
||||
static void
|
||||
_outTidPath(StringInfo str, TidPath *node)
|
||||
{
|
||||
@ -1853,6 +1875,12 @@ _outNode(StringInfo str, void *obj)
|
||||
case T_BitmapHeapPath:
|
||||
_outBitmapHeapPath(str, obj);
|
||||
break;
|
||||
case T_BitmapAndPath:
|
||||
_outBitmapAndPath(str, obj);
|
||||
break;
|
||||
case T_BitmapOrPath:
|
||||
_outBitmapOrPath(str, obj);
|
||||
break;
|
||||
case T_TidPath:
|
||||
_outTidPath(str, obj);
|
||||
break;
|
||||
|
Reference in New Issue
Block a user