Using the SVL_QUERY_REPORT View
To analyze query summary information by slice, do the following:
Run the following to determine your query ID:Copy
select query, elapsed, substring from svl_qlog order by query desc limit 5;
Examine the truncated query text in the
substringfield to determine which
queryvalue represents your query. If you have run the query more than once, use the
queryvalue from the row with the lower
elapsedvalue. That is the row for the compiled version. If you have been running many queries, you can raise the value used by the LIMIT clause used to make sure your query is included.
Select rows from SVL_QUERY_REPORT for your query. Order the results by segment, step, elapsed_time, and rows:Copy
select * from svl_query_report where query = MyQueryID order by segment, step, elapsed_time, rows;
For each step, check to see that all slices are processing approximately the same number of rows:
Also check to see that all slices are taking approximately the same amount of time:
Large discrepancies in these values can indicate data distribution skew due to a suboptimal distribution style for this particular query. For recommended solutions, see Suboptimal Data Distribution.