51 List *query_features);
125 foreach(
lc,
walker->toplevel_unrolled_joins)
144 walker->join_strategies[s]);
176 for (
int k = 0; k < join->
ninner; ++k)
230 if (context->
buf->
len > 0)
301 List *query_features)
305 if (query_features ==
NIL)
308 if (context->
buf->
len > 0)
359 if (context->
buf->
len > 0)
396 if (context->
buf->
len > 0)
412 if (identifiers ==
NIL)
414 if (context->
buf->
len > 0)
451 elog(
ERROR,
"no identifier for RTI %d", rti);
475 return "MERGE_JOIN_PLAIN";
477 return "MERGE_JOIN_MATERIALIZE";
479 return "NESTED_LOOP_PLAIN";
481 return "NESTED_LOOP_MATERIALIZE";
483 return "NESTED_LOOP_MEMOIZE";
501 return "ORDINARY_SCAN";
505 return "BITMAP_HEAP_SCAN";
507 return "FOREIGN_JOIN";
511 return "INDEX_ONLY_SCAN";
513 return "PARTITIONWISE";
533 return "GATHER_MERGE";
535 return "SEMIJOIN_NON_UNIQUE";
537 return "SEMIJOIN_UNIQUE";
566 if (wrap_column <= 0)
589 if (
buf->len - line_start <= wrap_column)
604 buf->data[++
buf->len] =
'\0';
int bms_next_member(const Bitmapset *a, int prevbit)
BMS_Membership bms_membership(const Bitmapset *a)
#define Assert(condition)
#define palloc0_array(type, count)
char * get_rel_name(Oid relid)
Oid get_rel_namespace(Oid relid)
char * get_namespace_name_or_temp(Oid nspid)
#define IsA(nodeptr, _type_)
static int list_length(const List *l)
#define foreach_ptr(type, var, lst)
#define foreach_node(type, var, lst)
static char buf[DEFAULT_XLOG_SEG_SIZE]
const char * pgpa_identifier_string(const pgpa_identifier *rid)
@ JSTRAT_MERGE_JOIN_PLAIN
@ JSTRAT_NESTED_LOOP_MATERIALIZE
@ JSTRAT_NESTED_LOOP_MEMOIZE
@ JSTRAT_NESTED_LOOP_PLAIN
@ JSTRAT_MERGE_JOIN_MATERIALIZE
#define NUM_PGPA_JOIN_STRATEGY
void pgpa_output_advice(StringInfo buf, pgpa_plan_walker_context *walker, pgpa_identifier *rt_identifiers)
static void pgpa_output_simple_strategy(pgpa_output_context *context, char *strategy, List *relid_sets)
static char * pgpa_cstring_join_strategy(pgpa_join_strategy strategy)
static void pgpa_output_relations(pgpa_output_context *context, StringInfo buf, Bitmapset *relids)
static void pgpa_output_no_gather(pgpa_output_context *context, Bitmapset *relids)
static void pgpa_maybe_linebreak(StringInfo buf, int wrap_column)
static void pgpa_output_unrolled_join(pgpa_output_context *context, pgpa_unrolled_join *join)
static void pgpa_output_relation_name(pgpa_output_context *context, Oid relid)
static void pgpa_output_scan_strategy(pgpa_output_context *context, pgpa_scan_strategy strategy, List *scans)
static void pgpa_output_query_feature(pgpa_output_context *context, pgpa_qf_type type, List *query_features)
static void pgpa_output_join_member(pgpa_output_context *context, pgpa_join_member *member)
static char * pgpa_cstring_scan_strategy(pgpa_scan_strategy strategy)
static char * pgpa_cstring_query_feature_type(pgpa_qf_type type)
static void pgpa_output_do_not_scan(pgpa_output_context *context, List *identifiers)
@ PGPA_SCAN_PARTITIONWISE
#define NUM_PGPA_SCAN_STRATEGY
@ PGPAQF_SEMIJOIN_NON_UNIQUE
#define NUM_PGPA_QF_TYPES
const char * quote_identifier(const char *ident)
void appendStringInfo(StringInfo str, const char *fmt,...)
void enlargeStringInfo(StringInfo str, int needed)
void appendStringInfoString(StringInfo str, const char *s)
void appendStringInfoChar(StringInfo str, char ch)
pgpa_unrolled_join * unrolled_join
const char ** rid_strings