33 #if defined (SERVER_MODE) 40 #define foutput stdout 48 #define HASH_NUMBER 128 50 #define HAVE_SUBQUERY_PROC(xasl_p) \ 51 ((xasl_p)->type != MERGELIST_PROC && (xasl_p)->type != UNION_PROC \ 52 && (xasl_p)->type != INTERSECTION_PROC && (xasl_p)->type != DIFFERENCE_PROC) 112 #if defined(CUBRID_DEBUG) 127 const char *type_string_p;
129 switch (xasl_p->
type)
132 type_string_p =
"buildlist_proc";
135 type_string_p =
"buildvalue_proc";
138 type_string_p =
"union_proc";
141 type_string_p =
"difference_proc";
144 type_string_p =
"intersection_proc";
147 type_string_p =
"objfetch_proc";
150 type_string_p =
"scan_proc";
153 type_string_p =
"mergelist_proc";
156 type_string_p =
"update_proc";
159 type_string_p =
"delete_proc";
162 type_string_p =
"insert_proc";
165 type_string_p =
"connectby_proc";
168 type_string_p =
"merge_proc";
171 type_string_p =
"cte_proc";
177 fprintf (
foutput,
"[%s:%p]\n", type_string_p, xasl_p);
197 for (i = 0; i <
count; i++, array_p++)
214 fprintf (
foutput,
"[%s:", title_p);
216 for (i = 0; i < col_count; i++)
218 fprintf (
foutput,
"%s%d", (i ?
"|" :
""), *(column_p + i));
233 if (merge_info_p ==
NULL)
265 fprintf (
foutput,
"-->outer access spec:");
272 fprintf (
foutput,
"-->outer val_list:");
281 fprintf (
foutput,
"-->inner access spec:");
288 fprintf (
foutput,
"-->inner val_list:");
304 fprintf (
foutput,
"[number of attributes to %s:%d]", action_p, attr_count);
305 fprintf (
foutput,
"[ID's of attributes for %s:", action_p);
307 for (i = 0; i < attr_count; i++)
309 fprintf (
foutput,
"%d%c", attr_ids_p[i], i == attr_count - 1 ?
']' :
',');
323 int i = 0, cnt = 0, idx = 0;
327 for (idx = 0; idx < cnt; idx++)
368 fprintf (
foutput,
"[number of HFID's to use:%d]", hfid_count);
444 return "sequential record info";
446 return "sequential page scan";
462 if (spec_list_p ==
NULL)
467 type = spec_list_p->
type;
502 fprintf (
foutput,
"\n key filter:");
508 fprintf (
foutput,
"\n access pred:");
514 fprintf (
foutput,
"\n access range:");
518 #if defined (SERVER_MODE) || defined (SA_MODE) 519 fprintf (
foutput,
"\n grouped scan=%d", spec_list_p->grouped_scan);
520 fprintf (
foutput,
",fixed scan=%d", spec_list_p->fixed_scan);
526 fprintf (
foutput,
"\n s_dbval:");
530 fprintf (
foutput,
"\n-->next access spec:");
580 fprintf (
foutput,
"key ranges:");
581 for (i = 0; i < key_info_p->
key_cnt; i++)
603 fprintf (
foutput,
" key limit: [");
624 return "R_RANGELIST";
643 fprintf (
foutput,
"<index id:");
652 fprintf (
foutput,
"key info:");
670 fprintf (
foutput,
"<Btree:(%d;%d;%d)>",
id.
vfid.
fileid,
id.vfid.volid,
id.root_pageid);
684 fprintf (
foutput,
"\n regu_list_key:");
686 fprintf (
foutput,
"\n regu_list_pred:");
688 fprintf (
foutput,
"\n regu_list_rest:");
703 fprintf (
foutput,
":%d",
id.hpgid);
715 fprintf (
foutput,
"vfid(%d;%d)",
id.fileid,
id.volid);
729 fprintf (
foutput,
"\n regu_list_pred:");
731 fprintf (
foutput,
"\n regu_list_rest:");
733 fprintf (
foutput,
"\n regu_list_build:");
735 fprintf (
foutput,
"\n regu_list_probe:");
749 fprintf (
foutput,
"\n show_args: ");
765 if (outlist_p ==
NULL)
771 fprintf (
foutput,
"-->%s:", title_p);
782 nextptr = nextptr->
next;
797 if (list_id_p ==
NULL)
802 fprintf (
foutput,
"(address:%p)", list_id_p);
803 fprintf (
foutput,
"(type_list:");
841 if (domains_p ==
NULL)
846 for (i = 0; i < cnt; i++)
862 if (sort_list_p ==
NULL)
867 fprintf (
foutput,
"<sorting field(POS):");
874 fprintf (
foutput,
"<sorting order:");
877 fprintf (
foutput,
"ascending>");
881 fprintf (
foutput,
"descending>");
899 fprintf (
foutput,
"attr_id:%d|db_type:", (
int) attr.
id);
930 if (value_list_p ==
NULL)
935 dbval_list = value_list_p->
valp;
938 while (dbval_list !=
NULL)
940 fprintf (
foutput,
"addr:%p|", dbval_list->
val);
950 dbval_list = dbval_list->
next;
965 if (var_list ==
NULL)
970 while (var_list !=
NULL)
978 var_list = var_list->
next;
1034 return "TYPE_DBVAL";
1036 return "TYPE_CONSTANT";
1038 return "TYPE_ORDERBY_NUM";
1040 return "TYPE_INARITH";
1042 return "TYPE_OUTARITH";
1044 return "TYPE_ATTR_ID";
1046 return "TYPE_CLASS_ATTR_ID";
1048 return "TYPE_SHARED_ATTR_ID";
1050 return "TYPE_POSITION";
1052 return "TYPE_LIST_ID";
1054 return "TYPE_POS_VALUE";
1058 return "TYPE_CLASSOID";
1062 return "TYPE_REGUVAL_LIST";
1064 return "TYPE_REGU_VAR_LIST";
1133 return "TIMESTAMPTZ";
1135 return "TIMESTAMPLTZ";
1139 return "DATETIMETZ";
1141 return "DATETIMELTZ";
1175 return "DB_RESULTSET";
1177 return "DB_MIDXKEY";
1185 return "[***UNKNOWN***]";
1197 if (value_p ==
NULL)
1205 fprintf (
foutput,
"[HIDDEN_COLUMN]");
1209 fprintf (
foutput,
"[xasl:%p]", value_p->xasl);
1216 switch (value_p->type)
1244 if (value_p->value.srlist_id->sorted)
1246 fprintf (
foutput,
"[SORTED]");
1250 fprintf (
foutput,
"[NOT SORTED]");
1290 if (regu_var_p ==
NULL)
1298 fprintf (
foutput,
"[HIDDEN_COLUMN]");
1301 fprintf (
foutput,
"[TYPE_FUNC]");
1303 fprintf (
foutput,
"operand-->");
1321 switch (regu_var_p->type)
1324 addr = (
void *) ®u_var_p->value.dbval;
1329 addr = (
void *) regu_var_p->value.dbvalptr;
1334 addr = (
void *) regu_var_p->value.arithptr;
1338 addr = (
void *) regu_var_p->value.srlist_id->list_id;
1344 addr = (
void *) ®u_var_p->value.attr_descr;
1348 addr = (
void *) ®u_var_p->value.pos_descr;
1352 addr = (
void *) ®u_var_p->value.val_pos;
1364 fprintf (
foutput,
":%p", addr);
1434 fprintf (
foutput,
"PATTERN:");
1460 ?
"PATTERN (CASE SENSITIVE):" :
"PATTERN (CASE INSENSITIVE):"));
1507 switch (pred_p->
type)
1531 if (bool_op ==
B_AND)
1535 else if (bool_op ==
B_OR)
1539 else if (bool_op ==
B_XOR)
1543 else if (bool_op ==
B_IS)
1587 switch (pred_p->
type)
1609 switch (pred_p->
type)
1622 while (parn_cnt > 0)
1714 #
if defined(ENABLE_UNUSED_FUNCTION)
1724 #if defined(ENABLE_UNUSED_FUNCTION) 1829 #if defined(CUBRID_DEBUG) 1836 qdump_check_xasl_tree (
xasl_node * xasl_p)
1846 qdump_check_node (xasl_p, chk_nodes);
1849 return qdump_print_inconsistencies (chk_nodes);
1861 UINTPTR access_node_hash;
1864 access_node_hash = (UINTPTR) xasl_p % HASH_NUMBER;
1866 for (check_node_p = chk_nodes[access_node_hash]; check_node_p; check_node_p = check_node_p->
next)
1868 if (check_node_p->
xasl_addr == (UINTPTR) xasl_p)
1878 if (check_node_p ==
NULL)
1882 check_node_p->
next = chk_nodes[access_node_hash];
1883 chk_nodes[access_node_hash] = check_node_p;
1884 check_node_p->
xasl_addr = (UINTPTR) xasl_p;
1890 return check_node_p;
1912 addr_hash = (UINTPTR) xasl_p % HASH_NUMBER;
1914 check_node_p = qdump_find_check_node_for (xasl_p, chk_nodes);
1915 if (check_node_p ==
NULL)
1931 for (spec_p = xasl_p->
spec_list; spec_p; spec_p = spec_p->
next)
1945 switch (xasl_p->
type)
1950 check_node1_p = qdump_find_check_node_for (xasl_p->
proc.
union_.
left, chk_nodes);
1956 check_node1_p = qdump_find_check_node_for (xasl_p->
proc.
union_.
right, chk_nodes);
1984 qdump_check_node (xasl_p->
aptr_list, chk_nodes);
1985 qdump_check_node (xasl_p->
bptr_list, chk_nodes);
1986 qdump_check_node (xasl_p->
scan_ptr, chk_nodes);
1987 qdump_check_node (xasl_p->
dptr_list, chk_nodes);
1988 qdump_check_node (xasl_p->
fptr_list, chk_nodes);
1990 qdump_check_node (xasl_p->
next, chk_nodes);
2006 for (check_node_p = chk_nodes[i]; check_node_p; check_node_p = check_node_p->
next)
2013 fprintf (stdout,
"\nSYSTEM ERROR--INCONSISTENT XASL TREE\n\n");
2016 fprintf (stdout,
"Referenced node [%lld] is not reachable in the tree\n",
2026 for (check_node_p = chk_nodes[i]; check_node_p; )
2028 tmp_node_p = check_node_p;
2029 check_node_p = check_node_p->
next;
2036 fprintf (stdout,
"\n");
2048 fprintf (
foutput,
"-->fetch <addr:%p><type:", node_p->
arg);
2054 fprintf (
foutput,
"-->set predicate:");
2061 fprintf (
foutput,
"-->ql_flag on (no null paths)\n");
2074 fprintf (
foutput,
"-->output columns:");
2087 fprintf (
foutput,
"-->group by list:");
2094 fprintf (
foutput,
"-->group by regu list:");
2101 fprintf (
foutput,
"-->group by val_list:");
2108 fprintf (
foutput,
"-->having predicate:");
2115 fprintf (
foutput,
"-->grbynum val:");
2125 fprintf (
foutput,
"-->grbynum predicate:");
2131 fprintf (
foutput,
"-->grbynum CONTINUE\n");
2137 fprintf (
foutput,
"-->having agg list:");
2149 fprintf (
foutput,
"-->WITH ROLLUP\n");
2161 fprintf (
foutput,
"-->having predicate:");
2168 fprintf (
foutput,
"-->grbynum val:");
2178 fprintf (
foutput,
"-->agg list:");
2185 fprintf (
foutput,
"-->outarith list:");
2191 fprintf (
foutput,
"-->always-false\n");
2204 fprintf (
foutput,
"-->start with predicate:");
2211 fprintf (
foutput,
"-->after connect by predicate:");
2218 fprintf (
foutput,
"-->input list id:");
2225 fprintf (
foutput,
"-->start with list id:");
2232 fprintf (
foutput,
"-->connect by regu list pred:");
2239 fprintf (
foutput,
"-->connect by regu list rest:");
2246 fprintf (
foutput,
"-->prior val list:");
2259 fprintf (
foutput,
"-->prior regu list pred:");
2266 fprintf (
foutput,
"-->prior regu list rest:");
2273 fprintf (
foutput,
"-->after connect by regu list pred:");
2280 fprintf (
foutput,
"-->after connect by regu list rest:");
2305 fprintf (
foutput,
"\n<start of xasl structure %p>\n", xasl_p);
2310 int save_flag, nflag;
2312 save_flag = xasl_p->
flag;
2315 fprintf (
foutput,
"-->[flag=");
2320 fprintf (
foutput,
"%sXASL_LINK_TO_REGU_VARIABLE", (nflag ?
"|" :
""));
2327 fprintf (
foutput,
"%sXASL_SKIP_ORDERBY_LIST", (nflag ?
"|" :
""));
2334 fprintf (
foutput,
"%sXASL_ZERO_CORR_LEVEL", (nflag ?
"|" :
""));
2341 fprintf (
foutput,
"%sXASL_TOP_MOST_XASL", (nflag ?
"|" :
""));
2347 fprintf (
foutput,
"%d%s", xasl_p->
flag, (nflag ?
"|" :
""));
2353 xasl_p->
flag = save_flag;
2363 fprintf (
foutput,
"-->list id:");
2370 fprintf (
foutput,
"-->order by list:");
2377 fprintf (
foutput,
"-->ordbynum val:");
2387 fprintf (
foutput,
"-->ordbynum predicate:");
2391 fprintf (
foutput,
"-->ordbynum CONTINUE\n");
2396 fprintf (
foutput,
"-->orderby limit:");
2398 fprintf (
foutput,
" (optimization %s)",
2405 fprintf (
foutput,
"-->single tuple:");
2409 fprintf (
foutput,
"[value list]:");
2410 for (value_list = single_tuple_p->
valp, i = 0; i < single_tuple_p->val_cnt;
2411 value_list = value_list->
next, i++)
2422 fprintf (
foutput,
"-->query DISTINCT\n");
2433 fprintf (
foutput,
"-->access spec:");
2440 fprintf (
foutput,
"-->merge spec:");
2447 fprintf (
foutput,
"-->val_list:");
2484 fprintf (
foutput,
"-->after_join predicate:");
2491 fprintf (
foutput,
"-->if predicate:");
2498 fprintf (
foutput,
"-->instnum val:");
2508 fprintf (
foutput,
"-->old instnum val:");
2518 fprintf (
foutput,
"-->instnum predicate:");
2523 fprintf (
foutput,
"-->instnum CONTINUE\n");
2529 fprintf (
foutput,
"-->level val:");
2539 fprintf (
foutput,
"-->level regu:");
2546 fprintf (
foutput,
"-->isleaf val:");
2556 fprintf (
foutput,
"-->isleaf regu:");
2563 fprintf (
foutput,
"-->iscycle val:");
2573 fprintf (
foutput,
"-->iscycle regu:");
2578 fprintf (
foutput,
"-->current spec:");
2586 switch (xasl_p->
type)
2621 fprintf (
foutput,
"-->update info:");
2627 fprintf (
foutput,
"-->delete info:");
2633 fprintf (
foutput,
"-->insert info:");
2639 fprintf (
foutput,
"-->merge info:");
2642 fprintf (
foutput,
"\n---->update:");
2648 fprintf (
foutput,
"\n---->insert:");
2664 fprintf (
foutput,
"end of internals of ");
2679 fprintf (
foutput,
"creator OID:");
2692 fprintf (
foutput,
"<end of xasl structure %p>\n", xasl_p);
2702 #if defined (SERVER_MODE) 2710 qdump_xasl_type_string (
XASL_NODE * xasl_p)
2712 switch (xasl_p->
type)
2730 return "DIFFERENCE";
2732 return "INTERSECTION";
2761 char *class_name =
NULL, *index_name =
NULL;
2764 json_t *scan =
NULL, *scan_array =
NULL;
2766 char spec_name[1024];
2771 for (spec = spec_list_p; spec !=
NULL; spec = spec->
next)
2778 scan_array = json_array ();
2781 for (spec = spec_list_p; spec !=
NULL; spec = spec->
next)
2783 scan = json_object ();
2795 spec_name[0] =
'\0';
2799 if (class_name !=
NULL)
2801 sprintf (spec_name,
"table (%s)", class_name);
2805 sprintf (spec_name,
"table (unknown)");
2813 if (class_name !=
NULL && index_name !=
NULL)
2815 sprintf (spec_name,
"index (%s.%s)", class_name, index_name);
2819 sprintf (spec_name,
"index (unknown)");
2824 json_object_set_new (scan,
"access", json_string (spec_name));
2826 if (class_name !=
NULL)
2830 if (index_name !=
NULL)
2837 json_object_set_new (scan,
"access", json_string (
"temp"));
2841 json_object_set_new (scan,
"access", json_string (
"show"));
2845 json_object_set_new (scan,
"access", json_string (
"set"));
2849 json_object_set_new (scan,
"access", json_string (
"method"));
2853 json_object_set_new (scan,
"access", json_string (
"class_attr"));
2856 scan_print_stats_json (&spec->s_id, scan);
2858 if (scan_array !=
NULL)
2860 json_array_append_new (scan_array, scan);
2864 if (scan_array !=
NULL)
2880 qdump_print_stats_json (
xasl_node * xasl_p, json_t * parent)
2882 ORDERBY_STATS *ostats;
2883 GROUPBY_STATS *gstats;
2884 json_t *proc, *scan =
NULL;
2885 json_t *subquery, *groupby, *orderby;
2886 json_t *left, *right, *outer, *inner;
2887 json_t *cte_non_recursive_part, *cte_recursive_part;
2889 if (xasl_p ==
NULL || parent ==
NULL)
2900 proc = json_object ();
2901 json_object_set_new (parent, qdump_xasl_type_string (xasl_p), proc);
2904 switch (xasl_p->
type)
2913 json_object_set_new (proc,
"time", json_integer (
TO_MSEC (xasl_p->xasl_stats.elapsed_time)));
2914 json_object_set_new (proc,
"fetch", json_integer (xasl_p->xasl_stats.fetches));
2915 json_object_set_new (proc,
"ioread", json_integer (xasl_p->xasl_stats.ioreads));
2921 left = json_object ();
2922 right = json_object ();
2927 json_object_set_new (proc,
"left", left);
2928 json_object_set_new (proc,
"right", right);
2932 outer = json_object ();
2933 inner = json_object ();
2938 json_object_set_new (proc,
"outer", outer);
2939 json_object_set_new (proc,
"inner", inner);
2943 inner = json_object ();
2944 outer = json_object ();
2949 json_object_set_new (proc,
"update", inner);
2950 json_object_set_new (proc,
"insert", outer);
2954 cte_non_recursive_part = json_object ();
2956 json_object_set_new (proc,
"non_recursive_part", cte_non_recursive_part);
2960 cte_recursive_part = json_object ();
2962 json_object_set_new (proc,
"recursive_part", cte_recursive_part);
2974 scan = qdump_print_access_spec_stats_json (xasl_p->
spec_list);
2978 scan = qdump_print_access_spec_stats_json (xasl_p->
merge_spec);
2983 json_object_set_new (proc,
"SCAN", scan);
2984 qdump_print_stats_json (xasl_p->
scan_ptr, scan);
2988 qdump_print_stats_json (xasl_p->
scan_ptr, proc);
2993 gstats = &xasl_p->groupby_stats;
2994 if (gstats->run_groupby)
2996 groupby = json_object ();
2998 json_object_set_new (groupby,
"time", json_integer (
TO_MSEC (gstats->groupby_time)));
3002 json_object_set_new (groupby,
"hash", json_true ());
3006 json_object_set_new (groupby,
"hash", json_string (
"partial"));
3010 json_object_set_new (groupby,
"hash", json_false ());
3013 if (gstats->groupby_sort)
3015 json_object_set_new (groupby,
"sort", json_true ());
3016 json_object_set_new (groupby,
"page", json_integer (gstats->groupby_pages));
3017 json_object_set_new (groupby,
"ioread", json_integer (gstats->groupby_ioreads));
3021 json_object_set_new (groupby,
"sort", json_false ());
3024 json_object_set_new (groupby,
"rows", json_integer (gstats->rows));
3025 json_object_set_new (proc,
"GROUPBY", groupby);
3028 ostats = &xasl_p->orderby_stats;
3031 orderby = json_object ();
3033 json_object_set_new (orderby,
"time", json_integer (
TO_MSEC (ostats->orderby_time)));
3035 if (ostats->orderby_filesort)
3037 json_object_set_new (orderby,
"sort", json_true ());
3038 json_object_set_new (orderby,
"page", json_integer (ostats->orderby_pages));
3039 json_object_set_new (orderby,
"ioread", json_integer (ostats->orderby_ioreads));
3041 else if (ostats->orderby_topnsort)
3043 json_object_set_new (orderby,
"topnsort", json_true ());
3047 json_object_set_new (orderby,
"skipsort", json_true ());
3050 json_object_set_new (proc,
"ORDERBY", orderby);
3057 subquery = json_object ();
3058 qdump_print_stats_json (xasl_p->
aptr_list, subquery);
3059 json_object_set_new (proc,
"SUBQUERY (uncorrelated)", subquery);
3063 qdump_print_stats_json (xasl_p->
aptr_list, proc);
3069 subquery = json_object ();
3070 qdump_print_stats_json (xasl_p->
dptr_list, subquery);
3071 json_object_set_new (proc,
"SUBQUERY (correlated)", subquery);
3082 qdump_print_access_spec_stats_text (FILE * fp,
ACCESS_SPEC_TYPE * spec_list_p,
int indent)
3085 char *class_name =
NULL, *index_name =
NULL;
3088 int i, multi_spec_indent;
3091 if (spec_list_p ==
NULL)
3098 multi_spec_indent = fprintf (fp,
"%*cSCAN ", indent,
' ');
3100 for (spec = spec_list_p, i = 0; spec !=
NULL; spec = spec->
next, i++)
3104 fprintf (fp,
"%*c", multi_spec_indent,
' ');
3119 if (class_name !=
NULL)
3121 fprintf (fp,
"(table: %s), ", class_name);
3125 fprintf (fp,
"(table: unknown), ");
3133 if (class_name !=
NULL && index_name !=
NULL)
3135 fprintf (fp,
"(index: %s.%s), ", class_name, index_name);
3139 fprintf (fp,
"(index: unknown), ");
3144 scan_print_stats_text (fp, &spec->s_id);
3146 if (class_name !=
NULL)
3150 if (index_name !=
NULL)
3157 scan_print_stats_text (fp, &spec->s_id);
3174 qdump_print_stats_text (FILE * fp,
xasl_node * xasl_p,
int indent)
3176 ORDERBY_STATS *ostats;
3177 GROUPBY_STATS *gstats;
3191 fprintf (fp,
"%*c", indent,
' ');
3194 switch (xasl_p->
type)
3203 fprintf (fp,
"%s (time: %d, fetch: %lld, ioread: %lld)\n", qdump_xasl_type_string (xasl_p),
3204 TO_MSEC (xasl_p->xasl_stats.elapsed_time), (
long long int) xasl_p->xasl_stats.fetches,
3205 (
long long int) xasl_p->xasl_stats.ioreads);
3210 fprintf (fp,
"UNION\n");
3215 fprintf (fp,
"DIFFERENCE\n");
3220 fprintf (fp,
"INTERSECTION\n");
3226 fprintf (fp,
"MERGELIST\n");
3232 fprintf (fp,
"MERGE\n");
3238 fprintf (fp,
"CTE (non_recursive_part)\n");
3242 fprintf (fp,
"%*c", indent,
' ');
3243 fprintf (fp,
"CTE (recursive_part)\n");
3254 qdump_print_access_spec_stats_text (fp, xasl_p->
spec_list, indent);
3255 qdump_print_access_spec_stats_text (fp, xasl_p->
merge_spec, indent);
3257 qdump_print_stats_text (fp, xasl_p->
scan_ptr, indent);
3260 gstats = &xasl_p->groupby_stats;
3261 if (gstats->run_groupby)
3263 fprintf (fp,
"%*c", indent,
' ');
3264 fprintf (fp,
"GROUPBY (time: %d",
TO_MSEC (gstats->groupby_time));
3268 fprintf (fp,
", hash: true");
3272 fprintf (fp,
", hash: partial");
3276 fprintf (fp,
", hash: false");
3279 if (gstats->groupby_sort)
3281 fprintf (fp,
", sort: true, page: %lld, ioread: %lld", (
long long int) gstats->groupby_pages,
3282 (
long long int) gstats->groupby_ioreads);
3286 fprintf (fp,
", sort: false");
3289 fprintf (fp,
", rows: %d)\n", gstats->rows);
3292 ostats = &xasl_p->orderby_stats;
3295 fprintf (fp,
"%*c", indent,
' ');
3296 fprintf (fp,
"ORDERBY (time: %d",
TO_MSEC (ostats->orderby_time));
3298 if (ostats->orderby_filesort)
3300 fprintf (fp,
", sort: true");
3301 fprintf (fp,
", page: %lld, ioread: %lld", (
long long int) ostats->orderby_pages,
3302 (
long long int) ostats->orderby_ioreads);
3304 else if (ostats->orderby_topnsort)
3306 fprintf (fp,
", topnsort: true");
3310 fprintf (fp,
", skipsort: true");
3312 fprintf (fp,
")\n");
3319 fprintf (fp,
"%*cSUBQUERY (uncorrelated)\n", indent,
' ');
3322 qdump_print_stats_text (fp, xasl_p->
aptr_list, indent);
3327 fprintf (fp,
"%*cSUBQUERY (correlated)\n", indent,
' ');
3328 qdump_print_stats_text (fp, xasl_p->
dptr_list, indent);
QPROC_SINGLE_FETCH single_fetch
regu_variable_node * key1
static bool qdump_print_attribute(const char *action_p, int attr_count, int *attr_ids_p)
static bool qdump_print_rlike_eval_term(EVAL_TERM *term_p)
static bool qdump_print_oid(OID *oidptr)
OUTPTR_LIST * outptr_list
REGU_VARIABLE_LIST prior_regu_list_pred
static const char * qdump_range_type_string(RANGE_TYPE range_type)
cubthread::entry * thread_get_thread_entry_info(void)
static bool qdump_print_type_list(QFILE_TUPLE_VALUE_TYPE_LIST *typeptr)
VAL_LIST * prior_val_list
static const char * qdump_target_type_string(TARGET_TYPE type)
DB_VALUE * save_instnum_val
static bool qdump_print_arith(int type, void *ptr)
#define XASL_CLEAR_FLAG(x, f)
ACCESS_SPEC_TYPE * merge_spec
regu_variable_node * key_limit_u
QFILE_TUPLE_VALUE_TYPE_LIST type_list
REGU_VARIABLE_LIST cls_regu_list_key
QDUMP_XASL_CHECK_NODE * next
static bool qdump_print_connect_by_proc_node(XASL_NODE *xasl_p)
BUILDVALUE_PROC_NODE buildvalue
#define XASL_G_GRBYNUM_FLAG_SCAN_CONTINUE
const int REGU_VARIABLE_HIDDEN_COLUMN
UPDDEL_CLASS_INFO * classes
#define ACCESS_SPEC_SHOWSTMT_SPEC(ptr)
union xasl_node::@155 proc
QFILE_LIST_MERGE_INFO ls_merge
regu_variable_node * elem
PRED_EXPR * g_grbynum_pred
union regu_variable_node::regu_data_value value
REGU_VARIABLE * orderby_limit
static bool qdump_print_predicate(PRED_EXPR *predptr)
static bool qdump_print_value_type_addr(REGU_VARIABLE *value)
#define XASL_LINK_TO_REGU_VARIABLE
static bool qdump_print_hfid(HFID id)
static bool qdump_print_vfid(VFID id)
static bool qdump_print_merge_list_proc_node(MERGELIST_PROC_NODE *ptr)
bool REGU_VARIABLE_IS_FLAGED(const regu_variable_node *regu, int flag)
aggregate_accumulator accumulator
#define ACCESS_SPEC_LIST_SPEC(ptr)
static bool qdump_print_regu_type(REGU_VARIABLE *value)
MERGELIST_PROC_NODE mergelist
UPDDEL_CLASS_INFO * classes
BUILDLIST_PROC_NODE buildlist
#define ACCESS_SPEC_SET_PTR(ptr)
ACCESS_SPEC_TYPE * inner_spec_list
static bool qdump_print_index(INDX_INFO *indexptr)
static bool qdump_print_comp_eval_term(EVAL_TERM *term_p)
PRED_EXPR * ordbynum_pred
REGU_VARIABLE_LIST list_regu_list_probe
REGU_VARIABLE_LIST list_regu_list_build
static bool qdump_print_xasl_type(XASL_NODE *xasl)
static bool qdump_print_column(const char *title_p, int col_count, int *column_p)
XASL_NODE * recursive_part
static bool qdump_print_value(REGU_VARIABLE *value)
PRED_EXPR * start_with_pred
ACCESS_SPEC_TYPE * curr_spec
bool qdump_print_xasl(xasl_node *xasl_p)
#define XASL_TOP_MOST_XASL
static bool qdump_print_class(CLS_SPEC_TYPE *ptr)
CONNECTBY_PROC_NODE connect_by
REGU_VARIABLE_LIST after_cb_regu_list_rest
const char * qdump_operator_type_string(OPERATOR_TYPE optype)
static bool qdump_print_arith_expression(ARITH_TYPE *arith_p)
static bool qdump_print_value_list(VAL_LIST *vallist)
REGU_VARIABLE_LIST list_regu_list_pred
union cubxasl::pred_expr::@185 pe
static bool qdump_print_function_value(REGU_VARIABLE *regu)
#define DB_VALUE_DOMAIN_TYPE(value)
static bool qdump_print_tuple_value_position(QFILE_TUPLE_VALUE_POSITION pos)
static const char * qdump_access_method_string(ACCESS_METHOD access)
#define ACCESS_SPEC_CLS_SPEC(ptr)
#define IS_ANY_INDEX_ACCESS(access_)
REGU_VARIABLE * level_regu
static bool qdump_print_build_value_node(XASL_NODE *xasl_p)
ARITH_TYPE * outarith_list
static bool qdump_print_db_value(DB_VALUE *value)
static bool qdump_print_access_spec(ACCESS_SPEC_TYPE *spec_list)
static const char * qdump_bool_operator_string(BOOL_OP bool_op)
static bool qdump_print_aggregate_expression(AGGREGATE_TYPE *aggptr)
#define TP_DOMAIN_TYPE(dom)
REGU_VARIABLE * iscycle_regu
PRED_EXPR * after_connect_by_pred
#define LOCK_TO_LOCKMODE_STRING(lock)
static bool qdump_print_update_proc_node(UPDATE_PROC_NODE *ptr)
static const char * qdump_key_range_string(RANGE range)
#define XASL_IS_FLAGED(x, f)
void db_value_print(const DB_VALUE *value)
XASL_NODE * connect_by_ptr
REGU_VARIABLE_LIST regu_list_rest
REGU_VARIABLE_LIST regu_list_pred
REGU_VARIABLE_LIST after_cb_regu_list_pred
QFILE_TUPLE_VALUE_POSITION pos_descr
static bool qdump_print_sort_list(SORT_LIST *sorting_list)
int * ls_outer_inner_list
static bool qdump_print_list(LIST_SPEC_TYPE *ptr)
static bool qdump_print_list_merge_info(QFILE_LIST_MERGE_INFO *ptr)
aggregate_list_node * next
REGU_VARIABLE_LIST list_regu_list_rest
AGGREGATE_TYPE * agg_list
static const char * qdump_regu_type_string(REGU_DATATYPE type)
int count(int &result, const cub_regex_object ®, const std::string &src, const int position, const INTL_CODESET codeset)
static bool qdump_print_attribute_id(ATTR_DESCR attr)
static bool qdump_print_lhs_predicate(PRED_EXPR *pred_p)
AGGREGATE_TYPE * g_agg_list
static const char * qdump_data_type_string(DB_TYPE type)
#define HAVE_SUBQUERY_PROC(xasl_p)
PRED_EXPR * after_join_pred
static const char * qdump_arith_operator_string(OPERATOR_TYPE opcode)
static void error(const char *msg)
#define XASL_SKIP_ORDERBY_LIST
#define ACCESS_SPEC_XASL_NODE(ptr)
#define XASL_INSTNUM_FLAG_SCAN_CONTINUE
VAL_LIST * outer_val_list
OUTPTR_LIST * prior_outptr_list
regu_variable_node * key2
static bool qdump_print_domain_list(int cnt, TP_DOMAIN **ptr)
static bool qdump_print_delete_proc_node(DELETE_PROC_NODE *ptr)
OUTPTR_LIST * g_outptr_list
regu_variable_node * elemset
static bool qdump_print_eval_term(PRED_EXPR *pred_p)
static bool qdump_print_insert_proc_node(INSERT_PROC_NODE *ptr)
#define free_and_init(ptr)
static bool qdump_print_btid(BTID id)
ACCESS_SPEC_TYPE * spec_list
bool is_user_given_keylimit
static bool qdump_print_fetch_node(XASL_NODE *xasl_p)
static bool qdump_print_regu_variable_list(REGU_VARIABLE_LIST varlist)
static bool qdump_print_build_list_node(XASL_NODE *xasl_p)
static bool qdump_print_showstmt(SHOWSTMT_SPEC_TYPE *ptr)
QFILE_LIST_ID * input_list_id
static bool qdump_print_list_id(QFILE_LIST_ID *idptr)
bool prm_get_bool_value(PARAM_ID prm_id)
class regu_variable_node REGU_VARIABLE
REGU_VARIABLE_LIST cls_regu_list_pred
static bool qdump_print_alsm_eval_term(EVAL_TERM *term_p)
REGU_VARIABLE_LIST cls_regu_list_rest
REGU_VARIABLE_LIST prior_regu_list_rest
static bool qdump_print_like_eval_term(EVAL_TERM *term_p)
REGU_VARIABLE_LIST arg_list
#define XASL_ORDBYNUM_FLAG_SCAN_CONTINUE
static bool qdump_print_outlist(const char *title, OUTPTR_LIST *outlist)
regu_variable_node * pattern
union cubxasl::eval_term::@184 et
QFILE_LIST_ID * start_with_list_id
static const char * qdump_relation_operator_string(int op)
#define XASL_ZERO_CORR_LEVEL
int heap_get_indexinfo_of_btid(THREAD_ENTRY *thread_p, const OID *class_oid, const BTID *btid, BTREE_TYPE *type, int *num_attrs, ATTR_ID **attr_ids, int **attrs_prefix_length, char **btnamepp, int *func_index_col_id)
regu_variable_node * pattern
REGU_VARIABLE_LIST g_regu_list
QPROC_SINGLE_FETCH single_fetch
PRED_EXPR * g_having_pred
ACCESS_SPEC_TYPE * outer_spec_list
int heap_get_class_name(THREAD_ENTRY *thread_p, const OID *class_oid, char **class_name)
static bool qdump_print_term(PRED_EXPR *pred_ptr)
regu_variable_node * esc_char
VAL_LIST * inner_val_list
REGU_VARIABLE_LIST valptrp
DB_VALUE ** output_columns
REGU_VARIABLE * isleaf_regu
static bool qdump_print_db_value_array(DB_VALUE **array, int cnt)
const char * fcode_get_uppercase_name(FUNC_TYPE ftype)
XASL_NODE * non_recursive_part
static bool qdump_print_key_info(KEY_INFO *key_info)
regu_variable_list_node * operands
static const char * qdump_option_string(int option)
regu_variable_node * case_sensitive
regu_variable_node * key_limit_l