mirror of
https://github.com/postgres/postgres.git
synced 2025-07-17 06:41:09 +03:00
Create executor and planner-backend support for decoupled heap and index
scans, using in-memory tuple ID bitmaps as the intermediary. The planner frontend (path creation and cost estimation) is not there yet, so none of this code can be executed. I have tested it using some hacked planner code that is far too ugly to see the light of day, however. Committing now so that the bulk of the infrastructure changes go in before the tree drifts under me.
This commit is contained in:
@ -8,7 +8,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $PostgreSQL: pgsql/src/backend/nodes/print.c,v 1.74 2005/04/06 16:34:05 tgl Exp $
|
||||
* $PostgreSQL: pgsql/src/backend/nodes/print.c,v 1.75 2005/04/19 22:35:15 tgl Exp $
|
||||
*
|
||||
* HISTORY
|
||||
* AUTHOR DATE MAJOR EVENT
|
||||
@ -493,12 +493,20 @@ plannode_type(Plan *p)
|
||||
return "RESULT";
|
||||
case T_Append:
|
||||
return "APPEND";
|
||||
case T_BitmapAnd:
|
||||
return "BITMAPAND";
|
||||
case T_BitmapOr:
|
||||
return "BITMAPOR";
|
||||
case T_Scan:
|
||||
return "SCAN";
|
||||
case T_SeqScan:
|
||||
return "SEQSCAN";
|
||||
case T_IndexScan:
|
||||
return "INDEXSCAN";
|
||||
case T_BitmapIndexScan:
|
||||
return "BITMAPINDEXSCAN";
|
||||
case T_BitmapHeapScan:
|
||||
return "BITMAPHEAPSCAN";
|
||||
case T_TidScan:
|
||||
return "TIDSCAN";
|
||||
case T_SubqueryScan:
|
||||
@ -551,7 +559,8 @@ print_plan_recursive(Plan *p, Query *parsetree, int indentLevel, char *label)
|
||||
p->startup_cost, p->total_cost,
|
||||
p->plan_rows, p->plan_width);
|
||||
if (IsA(p, Scan) ||
|
||||
IsA(p, SeqScan))
|
||||
IsA(p, SeqScan) ||
|
||||
IsA(p, BitmapHeapScan))
|
||||
{
|
||||
RangeTblEntry *rte;
|
||||
|
||||
@ -584,27 +593,48 @@ print_plan_recursive(Plan *p, Query *parsetree, int indentLevel, char *label)
|
||||
if (IsA(p, Append))
|
||||
{
|
||||
ListCell *l;
|
||||
int whichplan = 0;
|
||||
Append *appendplan = (Append *) p;
|
||||
|
||||
foreach(l, appendplan->appendplans)
|
||||
{
|
||||
Plan *subnode = (Plan *) lfirst(l);
|
||||
|
||||
/*
|
||||
* I don't think we need to fiddle with the range table here,
|
||||
* bjm
|
||||
*/
|
||||
print_plan_recursive(subnode, parsetree, indentLevel + 3, "a: ");
|
||||
}
|
||||
}
|
||||
|
||||
whichplan++;
|
||||
if (IsA(p, BitmapAnd))
|
||||
{
|
||||
ListCell *l;
|
||||
BitmapAnd *bitmapandplan = (BitmapAnd *) p;
|
||||
|
||||
foreach(l, bitmapandplan->bitmapplans)
|
||||
{
|
||||
Plan *subnode = (Plan *) lfirst(l);
|
||||
|
||||
print_plan_recursive(subnode, parsetree, indentLevel + 3, "a: ");
|
||||
}
|
||||
}
|
||||
|
||||
if (IsA(p, BitmapOr))
|
||||
{
|
||||
ListCell *l;
|
||||
BitmapOr *bitmaporplan = (BitmapOr *) p;
|
||||
|
||||
foreach(l, bitmaporplan->bitmapplans)
|
||||
{
|
||||
Plan *subnode = (Plan *) lfirst(l);
|
||||
|
||||
print_plan_recursive(subnode, parsetree, indentLevel + 3, "a: ");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* print_plan
|
||||
prints just the plan node types */
|
||||
|
||||
/*
|
||||
* print_plan
|
||||
*
|
||||
* prints just the plan node types
|
||||
*/
|
||||
void
|
||||
print_plan(Plan *p, Query *parsetree)
|
||||
{
|
||||
|
Reference in New Issue
Block a user