#ifdef OPTIMIZER_DEBUG
static void
-print_relids(Relids relids)
+print_relids(PlannerInfo *root, Relids relids)
{
int x;
bool first = true;
{
if (!first)
printf(" ");
- printf("%d", x);
+ if (x < root->simple_rel_array_size &&
+ root->simple_rte_array[x])
+ printf("%s", root->simple_rte_array[x]->eref->aliasname);
+ else
+ printf("%d", x);
first = false;
}
}
if (path->parent)
{
printf("(");
- print_relids(path->parent->relids);
- printf(") rows=%.0f", path->parent->rows);
+ print_relids(root, path->parent->relids);
+ printf(")");
+ }
+ if (path->param_info)
+ {
+ printf(" required_outer (");
+ print_relids(root, path->param_info->ppi_req_outer);
+ printf(")");
}
- printf(" cost=%.2f..%.2f\n", path->startup_cost, path->total_cost);
+ printf(" rows=%.0f cost=%.2f..%.2f\n",
+ path->rows, path->startup_cost, path->total_cost);
if (path->pathkeys)
{
ListCell *l;
printf("RELOPTINFO (");
- print_relids(rel->relids);
+ print_relids(root, rel->relids);
printf("): rows=%.0f width=%d\n", rel->rows, rel->reltarget->width);
if (rel->baserestrictinfo)
printf("\tpath list:\n");
foreach(l, rel->pathlist)
print_path(root, lfirst(l), 1);
+ if (rel->cheapest_parameterized_paths)
+ {
+ printf("\n\tcheapest parameterized paths:\n");
+ foreach(l, rel->cheapest_parameterized_paths)
+ print_path(root, lfirst(l), 1);
+ }
if (rel->cheapest_startup_path)
{
printf("\n\tcheapest startup path:\n");