summaryrefslogtreecommitdiff
path: root/mysql-test/r/analyze_stmt_orderby.result
diff options
context:
space:
mode:
authorSergei Petrunia <psergey@askmonty.org>2015-04-12 06:07:58 +0200
committerSergei Petrunia <psergey@askmonty.org>2015-04-12 06:07:58 +0200
commit2bbf3b89f66e391b126108fc3c4d4a5d2e440a38 (patch)
treeb0a825e0d2d14db7be50bb418c7e24208b27e983 /mysql-test/r/analyze_stmt_orderby.result
parentcc8da9b75aa8ed99be8ef5a7a765c9a4fb059014 (diff)
downloadmariadb-git-2bbf3b89f66e391b126108fc3c4d4a5d2e440a38.tar.gz
MDEV-7836: ANALYZE FORMAT=JSON should provide info about GROUP/ORDER BY
Fix EXPLAIN FORMAT=JSON to produce output that's not worse than the tabular form.
Diffstat (limited to 'mysql-test/r/analyze_stmt_orderby.result')
-rw-r--r--mysql-test/r/analyze_stmt_orderby.result70
1 files changed, 51 insertions, 19 deletions
diff --git a/mysql-test/r/analyze_stmt_orderby.result b/mysql-test/r/analyze_stmt_orderby.result
index d26d32180c1..76c51b2beb1 100644
--- a/mysql-test/r/analyze_stmt_orderby.result
+++ b/mysql-test/r/analyze_stmt_orderby.result
@@ -169,25 +169,27 @@ EXPLAIN
{
"query_block": {
"select_id": 1,
- "temporary_table": {
- "function": "buffer",
- "table": {
- "table_name": "t0",
- "access_type": "ALL",
- "rows": 10,
- "filtered": 100,
- "attached_condition": "(t0.a is not null)"
- },
- "table": {
- "table_name": "t2",
- "access_type": "ref",
- "possible_keys": ["a"],
- "key": "a",
- "key_length": "5",
- "used_key_parts": ["a"],
- "ref": ["test.t0.a"],
- "rows": 1,
- "filtered": 100
+ "filesort": {
+ "temporary_table": {
+ "function": "buffer",
+ "table": {
+ "table_name": "t0",
+ "access_type": "ALL",
+ "rows": 10,
+ "filtered": 100,
+ "attached_condition": "(t0.a is not null)"
+ },
+ "table": {
+ "table_name": "t2",
+ "access_type": "ref",
+ "possible_keys": ["a"],
+ "key": "a",
+ "key_length": "5",
+ "used_key_parts": ["a"],
+ "ref": ["test.t0.a"],
+ "rows": 1,
+ "filtered": 100
+ }
}
}
}
@@ -240,6 +242,36 @@ select * from t0,t2 where t2.a=t0.a order by t0.a limit 4;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t0 ALL NULL NULL NULL NULL 10 Using where; Using filesort
1 SIMPLE t2 ref a a 5 test.t0.a 1
+explain format=json
+select * from t0,t2 where t2.a=t0.a order by t0.a limit 4;
+EXPLAIN
+{
+ "query_block": {
+ "select_id": 1,
+ "read_sorted_file": {
+ "filesort": {
+ "table": {
+ "table_name": "t0",
+ "access_type": "ALL",
+ "rows": 10,
+ "filtered": 100,
+ "attached_condition": "(t0.a is not null)"
+ }
+ }
+ },
+ "table": {
+ "table_name": "t2",
+ "access_type": "ref",
+ "possible_keys": ["a"],
+ "key": "a",
+ "key_length": "5",
+ "used_key_parts": ["a"],
+ "ref": ["test.t0.a"],
+ "rows": 1,
+ "filtered": 100
+ }
+ }
+}
analyze format=json
select * from t0,t2 where t2.a=t0.a order by t0.a limit 4;
ANALYZE