51 List *query_features);
123 foreach(
lc,
walker->toplevel_unrolled_joins)
142 walker->join_strategies[s]);
171 for (
int k = 0; k < join->
ninner; ++k)
225 if (context->
buf->
len > 0)
296 List *query_features)
300 if (query_features ==
NIL)
303 if (context->
buf->
len > 0)
354 if (context->
buf->
len > 0)
391 if (context->
buf->
len > 0)
416 elog(
ERROR,
"no identifier for RTI %d", rti);
440 return "MERGE_JOIN_PLAIN";
442 return "MERGE_JOIN_MATERIALIZE";
444 return "NESTED_LOOP_PLAIN";
446 return "NESTED_LOOP_MATERIALIZE";
448 return "NESTED_LOOP_MEMOIZE";
466 return "ORDINARY_SCAN";
470 return "BITMAP_HEAP_SCAN";
472 return "FOREIGN_JOIN";
476 return "INDEX_ONLY_SCAN";
478 return "PARTITIONWISE";
498 return "GATHER_MERGE";
500 return "SEMIJOIN_NON_UNIQUE";
502 return "SEMIJOIN_UNIQUE";
531 if (wrap_column <= 0)
554 if (
buf->len - line_start <= wrap_column)
569 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)
@ 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