diff --git a/mysql-test/main/analyze_engine_stats.result b/mysql-test/main/analyze_engine_stats.result index 02eb936c4c625..d68324a4bb527 100644 --- a/mysql-test/main/analyze_engine_stats.result +++ b/mysql-test/main/analyze_engine_stats.result @@ -40,8 +40,9 @@ X "pages_accessed": "REPLACED" }, "filtered": 100, - "r_filtered": 100, - "attached_condition": "t1.pk < 120000" + "r_total_filtered": 100, + "attached_condition": "t1.pk < 120000", + "r_filtered": 100 } } ] @@ -70,13 +71,14 @@ X "access_type": "ALL", "rows": 10000, "r_rows": 10000, - "r_filtered": 100, + "r_total_filtered": 100, "r_total_time_ms": "REPLACED", "r_engine_stats": { "pages_accessed": "REPLACED", "pages_updated": "REPLACED" }, - "attached_condition": "t1.pk < 120000" + "attached_condition": "t1.pk < 120000", + "r_filtered": 100 } } } @@ -103,13 +105,14 @@ X "access_type": "ALL", "rows": 10000, "r_rows": 10000, - "r_filtered": 50, + "r_total_filtered": 50, "r_total_time_ms": "REPLACED", "r_engine_stats": { "pages_accessed": "REPLACED", "pages_updated": "REPLACED" }, - "attached_condition": "t1.pk MOD 2 = 1" + "attached_condition": "t1.pk MOD 2 = 1", + "r_filtered": 50 } } } @@ -155,6 +158,7 @@ ANALYZE "r_other_time_ms": "REPLACED", "r_engine_stats": REPLACED, "filtered": 100, + "r_total_filtered": 100, "r_filtered": 100 } }, @@ -174,6 +178,7 @@ ANALYZE "r_table_time_ms": "REPLACED", "r_other_time_ms": "REPLACED", "filtered": 100, + "r_total_filtered": 100, "r_filtered": 100, "materialized": { "unique": 1, @@ -193,6 +198,7 @@ ANALYZE "r_other_time_ms": "REPLACED", "r_engine_stats": REPLACED, "filtered": 100, + "r_total_filtered": 100, "r_filtered": 100 } } diff --git a/mysql-test/main/analyze_format_json.result b/mysql-test/main/analyze_format_json.result index eada44e8e8425..1b895d99c0a67 100644 --- a/mysql-test/main/analyze_format_json.result +++ b/mysql-test/main/analyze_format_json.result @@ -27,8 +27,9 @@ ANALYZE "r_other_time_ms": "REPLACED", "r_engine_stats": REPLACED, "filtered": 100, - "r_filtered": 30, - "attached_condition": "t0.a < 3" + "r_total_filtered": 30, + "attached_condition": "t0.a < 3", + "r_filtered": 30 } } ] @@ -67,8 +68,9 @@ ANALYZE "r_other_time_ms": "REPLACED", "r_engine_stats": REPLACED, "filtered": 100, - "r_filtered": 0, - "attached_condition": "t0.a > 9 and t0.a is not null" + "r_total_filtered": 0, + "attached_condition": "t0.a > 9 and t0.a is not null", + "r_filtered": 0 } }, { @@ -87,6 +89,7 @@ ANALYZE "cost": "REPLACED", "r_engine_stats": REPLACED, "filtered": 100, + "r_total_filtered": null, "r_filtered": null } } @@ -124,8 +127,9 @@ ANALYZE "r_other_time_ms": "REPLACED", "r_engine_stats": REPLACED, "filtered": 100, - "r_filtered": 100, - "attached_condition": "t0.a is not null" + "r_total_filtered": 100, + "attached_condition": "t0.a is not null", + "r_filtered": 100 } }, { @@ -146,8 +150,9 @@ ANALYZE "r_other_time_ms": "REPLACED", "r_engine_stats": REPLACED, "filtered": 100, - "r_filtered": 40, - "attached_condition": "t1.b < 4" + "r_total_filtered": 40, + "attached_condition": "t1.b < 4", + "r_filtered": 40 } } ] @@ -184,8 +189,9 @@ ANALYZE "r_other_time_ms": "REPLACED", "r_engine_stats": REPLACED, "filtered": 100, - "r_filtered": 20, - "attached_condition": "tbl1.b < 20" + "r_total_filtered": 20, + "attached_condition": "tbl1.b < 20", + "r_filtered": 20 } }, { @@ -202,8 +208,9 @@ ANALYZE "r_other_time_ms": "REPLACED", "r_engine_stats": REPLACED, "filtered": 100, - "r_filtered": 60, - "attached_condition": "tbl2.b < 60" + "r_total_filtered": 60, + "attached_condition": "tbl2.b < 60", + "r_filtered": 60 }, "buffer_type": "flat", "buffer_size": "1Kb", @@ -244,8 +251,9 @@ ANALYZE "r_other_time_ms": "REPLACED", "r_engine_stats": REPLACED, "filtered": 100, - "r_filtered": 20, - "attached_condition": "tbl1.b < 20" + "r_total_filtered": 20, + "attached_condition": "tbl1.b < 20", + "r_filtered": 20 } }, { @@ -262,8 +270,9 @@ ANALYZE "r_other_time_ms": "REPLACED", "r_engine_stats": REPLACED, "filtered": 100, - "r_filtered": 60, - "attached_condition": "tbl2.b < 60" + "r_total_filtered": 60, + "attached_condition": "tbl2.b < 60", + "r_filtered": 60 }, "buffer_type": "flat", "buffer_size": "1Kb", @@ -313,8 +322,9 @@ ANALYZE "r_other_time_ms": "REPLACED", "r_engine_stats": REPLACED, "filtered": 100, - "r_filtered": 100, - "attached_condition": "t1.a is not null" + "r_total_filtered": 100, + "attached_condition": "t1.a is not null", + "r_filtered": 100 } }, { @@ -335,6 +345,7 @@ ANALYZE "r_other_time_ms": "REPLACED", "r_engine_stats": REPLACED, "filtered": 100, + "r_total_filtered": 100, "r_filtered": 100, "using_index": true } @@ -381,8 +392,9 @@ ANALYZE "r_other_time_ms": "REPLACED", "r_engine_stats": REPLACED, "filtered": 100, - "r_filtered": 50, - "attached_condition": "test.t1.a < 5" + "r_total_filtered": 50, + "attached_condition": "test.t1.a < 5", + "r_filtered": 50 } } ] @@ -418,9 +430,10 @@ ANALYZE "access_type": "ALL", "rows": 1000, "r_rows": 1000, - "r_filtered": 100, + "r_total_filtered": 100, "r_total_time_ms": "REPLACED", - "r_engine_stats": REPLACED + "r_engine_stats": REPLACED, + "r_filtered": 100 } } } @@ -448,16 +461,18 @@ ANALYZE "loops": 1, "r_loops": 1, "rows": 10, + "r_index_rows": 10, "r_rows": 10, "cost": "REPLACED", "r_table_time_ms": "REPLACED", "r_other_time_ms": "REPLACED", "r_engine_stats": REPLACED, - "r_icp_filtered": 100, "filtered": 100, - "r_filtered": 50, + "r_total_filtered": 50, "index_condition": "t1.pk < 10", - "attached_condition": "t1.b > 4" + "r_icp_filtered": 100, + "attached_condition": "t1.b > 4", + "r_filtered": 50 } } ] @@ -483,10 +498,11 @@ ANALYZE "used_key_parts": ["pk"], "rows": 10, "r_rows": 10, - "r_filtered": 50, + "r_total_filtered": 50, "r_total_time_ms": "REPLACED", "r_engine_stats": REPLACED, - "attached_condition": "t1.pk < 10 and t1.b > 4" + "attached_condition": "t1.pk < 10 and t1.b > 4", + "r_filtered": 50 } } } @@ -536,6 +552,7 @@ ANALYZE "r_other_time_ms": "REPLACED", "r_engine_stats": REPLACED, "filtered": 100, + "r_total_filtered": 100, "r_filtered": 100 } }, @@ -565,6 +582,7 @@ ANALYZE "r_other_time_ms": "REPLACED", "r_engine_stats": REPLACED, "filtered": 100, + "r_total_filtered": 98.13542689, "r_filtered": 98.13542689 } } @@ -613,8 +631,9 @@ ANALYZE "r_other_time_ms": "REPLACED", "r_engine_stats": REPLACED, "filtered": 100, - "r_filtered": 50, - "attached_condition": "tbl1.a < 5" + "r_total_filtered": 50, + "attached_condition": "tbl1.a < 5", + "r_filtered": 50 } } ] @@ -641,8 +660,9 @@ ANALYZE "r_other_time_ms": "REPLACED", "r_engine_stats": REPLACED, "filtered": 100, - "r_filtered": 20, - "attached_condition": "tbl2.a in (2,3)" + "r_total_filtered": 20, + "attached_condition": "tbl2.a in (2,3)", + "r_filtered": 20 } } ] @@ -702,6 +722,7 @@ ANALYZE "r_other_time_ms": "REPLACED", "r_engine_stats": REPLACED, "filtered": 100, + "r_total_filtered": 100, "r_filtered": 100 } } @@ -745,6 +766,7 @@ ANALYZE "r_other_time_ms": "REPLACED", "r_engine_stats": REPLACED, "filtered": 100, + "r_total_filtered": 100, "r_filtered": 100 } } @@ -802,6 +824,7 @@ ANALYZE "r_other_time_ms": "REPLACED", "r_engine_stats": REPLACED, "filtered": 100, + "r_total_filtered": 100, "r_filtered": 100 } } @@ -843,6 +866,7 @@ ANALYZE "r_other_time_ms": "REPLACED", "r_engine_stats": REPLACED, "filtered": 100, + "r_total_filtered": 100, "r_filtered": 100 } }, @@ -860,8 +884,9 @@ ANALYZE "r_other_time_ms": "REPLACED", "r_engine_stats": REPLACED, "filtered": 100, - "r_filtered": 0, - "attached_condition": "(t2.b,t2.b in (subquery#2))" + "r_total_filtered": 0, + "attached_condition": "(t2.b,t2.b in (subquery#2))", + "r_filtered": 0 }, "buffer_type": "flat", "buffer_size": "65", @@ -896,6 +921,7 @@ ANALYZE "r_other_time_ms": "REPLACED", "r_engine_stats": REPLACED, "filtered": 100, + "r_total_filtered": 100, "r_filtered": 100 } } @@ -964,6 +990,7 @@ ANALYZE "r_other_time_ms": "REPLACED", "r_engine_stats": REPLACED, "filtered": 100, + "r_total_filtered": 100, "r_filtered": 100 } }, @@ -981,8 +1008,9 @@ ANALYZE "r_other_time_ms": "REPLACED", "r_engine_stats": REPLACED, "filtered": 100, - "r_filtered": 0, - "attached_condition": "t3.f3 in (1,2)" + "r_total_filtered": 0, + "attached_condition": "t3.f3 in (1,2)", + "r_filtered": 0 }, "buffer_type": "flat", "buffer_size": "1", @@ -1015,6 +1043,7 @@ ANALYZE "cost": "REPLACED", "r_engine_stats": REPLACED, "filtered": 100, + "r_total_filtered": null, "r_filtered": null } }, @@ -1030,6 +1059,7 @@ ANALYZE "cost": "REPLACED", "r_engine_stats": REPLACED, "filtered": 100, + "r_total_filtered": null, "r_filtered": null }, "buffer_type": "flat", @@ -1088,8 +1118,9 @@ ANALYZE "r_other_time_ms": "REPLACED", "r_engine_stats": REPLACED, "filtered": 100, - "r_filtered": 0, - "attached_condition": "t1.a < 0" + "r_total_filtered": 0, + "attached_condition": "t1.a < 0", + "r_filtered": 0 } } ], @@ -1122,8 +1153,9 @@ ANALYZE "cost": "REPLACED", "r_engine_stats": REPLACED, "filtered": 100, - "r_filtered": null, - "attached_condition": "t2.a < t1.a" + "r_total_filtered": null, + "attached_condition": "t2.a < t1.a", + "r_filtered": null } } } @@ -1185,8 +1217,9 @@ ANALYZE "r_other_time_ms": "REPLACED", "r_engine_stats": REPLACED, "filtered": 10, - "r_filtered": 10, - "attached_condition": "t11.a < 100" + "r_total_filtered": 10, + "attached_condition": "t11.a < 100", + "r_filtered": 10 } }, { @@ -1203,8 +1236,9 @@ ANALYZE "r_other_time_ms": "REPLACED", "r_engine_stats": REPLACED, "filtered": 70, - "r_filtered": 70, - "attached_condition": "t10.a < 700" + "r_total_filtered": 70, + "attached_condition": "t10.a < 700", + "r_filtered": 70 }, "buffer_type": "flat", "buffer_size": "1Kb", @@ -1251,8 +1285,9 @@ ANALYZE "r_other_time_ms": "REPLACED", "r_engine_stats": REPLACED, "filtered": 10, - "r_filtered": 10, - "attached_condition": "t11.a < 100 and t11.b is not null" + "r_total_filtered": 10, + "attached_condition": "t11.a < 100 and t11.b is not null", + "r_filtered": 10 } }, { @@ -1273,8 +1308,9 @@ ANALYZE "r_other_time_ms": "REPLACED", "r_engine_stats": REPLACED, "filtered": 0.209580004, - "r_filtered": 70, - "attached_condition": "t10.a < 700" + "r_total_filtered": 70, + "attached_condition": "t10.a < 700", + "r_filtered": 70 }, "buffer_type": "flat", "buffer_size": "3Kb", @@ -1342,6 +1378,7 @@ ANALYZE "r_other_time_ms": "REPLACED", "r_engine_stats": REPLACED, "filtered": 100, + "r_total_filtered": 100, "r_filtered": 100 } } @@ -1373,15 +1410,17 @@ ANALYZE "loops": 1, "r_loops": 1, "rows": 3, + "r_index_rows": 3, "r_rows": 2, "cost": "REPLACED", "r_table_time_ms": "REPLACED", "r_other_time_ms": "REPLACED", "r_engine_stats": REPLACED, - "r_icp_filtered": 66.66666667, "filtered": 100, - "r_filtered": 100, - "index_condition": "t12.b like '%f%'" + "r_total_filtered": 66.66666667, + "index_condition": "t12.b like '%f%'", + "r_icp_filtered": 66.66666667, + "r_filtered": 100 } } ] @@ -1426,14 +1465,16 @@ ANALYZE "loops": 1, "r_loops": 1, "rows": 3, + "r_index_rows": 3, "r_rows": 1, "cost": "REPLACED", "r_table_time_ms": "REPLACED", "r_other_time_ms": "REPLACED", "r_engine_stats": REPLACED, "filtered": 41.66666794, - "r_filtered": 100, - "attached_condition": "t12.c between 400 and 500" + "r_total_filtered": 33.33333333, + "attached_condition": "t12.c between 400 and 500", + "r_filtered": 100 } } ] @@ -1478,16 +1519,18 @@ ANALYZE "loops": 1, "r_loops": 1, "rows": 3, + "r_index_rows": 3, "r_rows": 1, "cost": "REPLACED", "r_table_time_ms": "REPLACED", "r_other_time_ms": "REPLACED", "r_engine_stats": REPLACED, - "r_icp_filtered": 66.66666667, "filtered": 41.66666794, - "r_filtered": 100, + "r_total_filtered": 33.33333333, "index_condition": "t12.b like '%f%'", - "attached_condition": "t12.c between 400 and 500" + "r_icp_filtered": 66.66666667, + "attached_condition": "t12.c between 400 and 500", + "r_filtered": 100 } } ] @@ -1518,15 +1561,17 @@ ANALYZE "loops": 1, "r_loops": 1, "rows": 2, + "r_index_rows": 2, "r_rows": 2, "cost": "REPLACED", "r_table_time_ms": "REPLACED", "r_other_time_ms": "REPLACED", "r_engine_stats": REPLACED, - "r_icp_filtered": 100, "filtered": 100, - "r_filtered": 100, - "index_condition": "t13.a between 1 and 2" + "r_total_filtered": 100, + "index_condition": "t13.a between 1 and 2", + "r_icp_filtered": 100, + "r_filtered": 100 } }, { @@ -1541,15 +1586,17 @@ ANALYZE "loops": 2, "r_loops": 2, "rows": 3, + "r_index_rows": 2, "r_rows": 1, "cost": "REPLACED", "r_table_time_ms": "REPLACED", "r_other_time_ms": "REPLACED", "r_engine_stats": REPLACED, - "r_icp_filtered": 50, "filtered": 100, - "r_filtered": 100, - "index_condition": "t12.b like '%f%'" + "r_total_filtered": 50, + "index_condition": "t12.b like '%f%'", + "r_icp_filtered": 50, + "r_filtered": 100 } } ] @@ -1580,15 +1627,17 @@ ANALYZE "loops": 1, "r_loops": 1, "rows": 2, + "r_index_rows": 2, "r_rows": 2, "cost": "REPLACED", "r_table_time_ms": "REPLACED", "r_other_time_ms": "REPLACED", "r_engine_stats": REPLACED, - "r_icp_filtered": 100, "filtered": 100, - "r_filtered": 100, - "index_condition": "t13.b between 1 and 2" + "r_total_filtered": 100, + "index_condition": "t13.b between 1 and 2", + "r_icp_filtered": 100, + "r_filtered": 100 } }, { @@ -1616,14 +1665,16 @@ ANALYZE "loops": 2, "r_loops": 2, "rows": 3, + "r_index_rows": 2, "r_rows": 0.5, "cost": "REPLACED", "r_table_time_ms": "REPLACED", "r_other_time_ms": "REPLACED", "r_engine_stats": REPLACED, "filtered": 41.66666794, - "r_filtered": 100, - "attached_condition": "t12.c between 400 and 450" + "r_total_filtered": 25, + "attached_condition": "t12.c between 400 and 450", + "r_filtered": 100 } } ] @@ -1654,15 +1705,17 @@ ANALYZE "loops": 1, "r_loops": 1, "rows": 2, + "r_index_rows": 2, "r_rows": 2, "cost": "REPLACED", "r_table_time_ms": "REPLACED", "r_other_time_ms": "REPLACED", "r_engine_stats": REPLACED, - "r_icp_filtered": 100, "filtered": 100, - "r_filtered": 100, - "index_condition": "t13.b between 1 and 2" + "r_total_filtered": 100, + "index_condition": "t13.b between 1 and 2", + "r_icp_filtered": 100, + "r_filtered": 100 } }, { @@ -1690,16 +1743,18 @@ ANALYZE "loops": 2, "r_loops": 2, "rows": 3, + "r_index_rows": 2, "r_rows": 0.5, "cost": "REPLACED", "r_table_time_ms": "REPLACED", "r_other_time_ms": "REPLACED", "r_engine_stats": REPLACED, - "r_icp_filtered": 50, "filtered": 41.66666794, - "r_filtered": 100, + "r_total_filtered": 25, "index_condition": "t12.b like '%f%'", - "attached_condition": "t12.c between 400 and 450" + "r_icp_filtered": 50, + "attached_condition": "t12.c between 400 and 450", + "r_filtered": 100 } } ] diff --git a/mysql-test/main/analyze_format_json_timings.result b/mysql-test/main/analyze_format_json_timings.result index 1b5f97766a9d7..85f963c6c2f7a 100644 --- a/mysql-test/main/analyze_format_json_timings.result +++ b/mysql-test/main/analyze_format_json_timings.result @@ -59,8 +59,9 @@ X "r_other_time_ms": "REPLACED", "r_engine_stats": REPLACED, "filtered": 100, - "r_filtered": 100, - "attached_condition": "t1.a < 700 and t1.b is not null" + "r_total_filtered": 100, + "attached_condition": "t1.a < 700 and t1.b is not null", + "r_filtered": 100 } }, { @@ -81,8 +82,9 @@ X "r_other_time_ms": "REPLACED", "r_engine_stats": REPLACED, "filtered": 10, - "r_filtered": 20, - "attached_condition": "t2.a < 100" + "r_total_filtered": 20, + "attached_condition": "t2.a < 100", + "r_filtered": 20 }, "buffer_type": "flat", "buffer_size": "18Kb", @@ -157,8 +159,9 @@ X "r_other_time_ms": "REPLACED", "r_engine_stats": REPLACED, "filtered": 100, - "r_filtered": 100, - "attached_condition": "t1.a is not null" + "r_total_filtered": 100, + "attached_condition": "t1.a is not null", + "r_filtered": 100 } }, { @@ -179,6 +182,7 @@ X "r_other_time_ms": "REPLACED", "r_engine_stats": REPLACED, "filtered": 10, + "r_total_filtered": 100, "r_filtered": 100 }, "buffer_type": "flat", diff --git a/mysql-test/main/analyze_stmt_orderby.result b/mysql-test/main/analyze_stmt_orderby.result index 020e68f34de9e..6db47ec187b17 100644 --- a/mysql-test/main/analyze_stmt_orderby.result +++ b/mysql-test/main/analyze_stmt_orderby.result @@ -54,9 +54,10 @@ ANALYZE "access_type": "ALL", "rows": 10000, "r_rows": 10000, - "r_filtered": 100, + "r_total_filtered": 100, "r_total_time_ms": "REPLACED", - "r_engine_stats": REPLACED + "r_engine_stats": REPLACED, + "r_filtered": 100 } } } @@ -110,10 +111,11 @@ ANALYZE "used_key_parts": ["a"], "rows": 9, "r_rows": 10, - "r_filtered": 100, + "r_total_filtered": 100, "r_total_time_ms": "REPLACED", "r_engine_stats": REPLACED, - "attached_condition": "t2.a < 10" + "attached_condition": "t2.a < 10", + "r_filtered": 100 } } } @@ -164,9 +166,10 @@ ANALYZE "access_type": "ALL", "rows": 10000, "r_rows": 10000, - "r_filtered": 100, + "r_total_filtered": 100, "r_total_time_ms": "REPLACED", - "r_engine_stats": REPLACED + "r_engine_stats": REPLACED, + "r_filtered": 100 } } } @@ -256,8 +259,9 @@ ANALYZE "r_other_time_ms": "REPLACED", "r_engine_stats": REPLACED, "filtered": 100, - "r_filtered": 100, - "attached_condition": "t0.a is not null" + "r_total_filtered": 100, + "attached_condition": "t0.a is not null", + "r_filtered": 100 } }, { @@ -278,6 +282,7 @@ ANALYZE "r_other_time_ms": "REPLACED", "r_engine_stats": REPLACED, "filtered": 100, + "r_total_filtered": 100, "r_filtered": 100 } } @@ -372,8 +377,9 @@ ANALYZE "r_other_time_ms": "REPLACED", "r_engine_stats": REPLACED, "filtered": 100, - "r_filtered": 100, - "attached_condition": "t0.a is not null" + "r_total_filtered": 100, + "attached_condition": "t0.a is not null", + "r_filtered": 100 } } } @@ -396,6 +402,7 @@ ANALYZE "r_other_time_ms": "REPLACED", "r_engine_stats": REPLACED, "filtered": 100, + "r_total_filtered": 100, "r_filtered": 100 } } @@ -449,8 +456,9 @@ ANALYZE "r_other_time_ms": "REPLACED", "r_engine_stats": REPLACED, "filtered": 100, - "r_filtered": 50, - "attached_condition": "t2.a MOD 2 = 0" + "r_total_filtered": 50, + "attached_condition": "t2.a MOD 2 = 0", + "r_filtered": 50 } } ] @@ -509,6 +517,7 @@ ANALYZE "r_other_time_ms": "REPLACED", "r_engine_stats": REPLACED, "filtered": 100, + "r_total_filtered": 100, "r_filtered": 100 } }, @@ -526,6 +535,7 @@ ANALYZE "r_other_time_ms": "REPLACED", "r_engine_stats": REPLACED, "filtered": 100, + "r_total_filtered": 100, "r_filtered": 100 }, "buffer_type": "flat", @@ -603,8 +613,9 @@ ANALYZE "r_other_time_ms": "REPLACED", "r_engine_stats": REPLACED, "filtered": 100, - "r_filtered": 80, - "attached_condition": "t6.b > 0 and t6.a <= 5" + "r_total_filtered": 80, + "attached_condition": "t6.b > 0 and t6.a <= 5", + "r_filtered": 80 } }, { @@ -621,6 +632,7 @@ ANALYZE "r_other_time_ms": "REPLACED", "r_engine_stats": REPLACED, "filtered": 100, + "r_total_filtered": 100, "r_filtered": 100 }, "buffer_type": "flat", @@ -742,6 +754,7 @@ ANALYZE "r_other_time_ms": "REPLACED", "r_engine_stats": REPLACED, "filtered": 100, + "r_total_filtered": 100, "r_filtered": 100, "using_index_for_group_by": true } diff --git a/mysql-test/main/cte_recursive.result b/mysql-test/main/cte_recursive.result index b92804dce3605..9349658fd7c55 100644 --- a/mysql-test/main/cte_recursive.result +++ b/mysql-test/main/cte_recursive.result @@ -2527,6 +2527,7 @@ ANALYZE "r_table_time_ms": "REPLACED", "r_other_time_ms": "REPLACED", "filtered": 100, + "r_total_filtered": 100, "r_filtered": 100, "materialized": { "query_block": { @@ -2564,8 +2565,9 @@ ANALYZE "r_table_time_ms": "REPLACED", "r_other_time_ms": "REPLACED", "filtered": 100, - "r_filtered": 90, - "attached_condition": "src.counter < 10" + "r_total_filtered": 90, + "attached_condition": "src.counter < 10", + "r_filtered": 90 } } ] @@ -3945,8 +3947,9 @@ ANALYZE "r_other_time_ms": "REPLACED", "r_engine_stats": REPLACED, "filtered": 100, - "r_filtered": 100, - "attached_condition": "t1.a1 is not null" + "r_total_filtered": 100, + "attached_condition": "t1.a1 is not null", + "r_filtered": 100 } }, { @@ -3966,6 +3969,7 @@ ANALYZE "r_table_time_ms": "REPLACED", "r_other_time_ms": "REPLACED", "filtered": 100, + "r_total_filtered": 100, "r_filtered": 100, "first_match": "t1", "materialized": { @@ -3996,6 +4000,7 @@ ANALYZE "r_rows": null, "r_engine_stats": REPLACED, "filtered": 100, + "r_total_filtered": null, "r_filtered": null, "using_index": true } @@ -4025,8 +4030,9 @@ ANALYZE "r_other_time_ms": "REPLACED", "r_engine_stats": REPLACED, "filtered": 100, - "r_filtered": 100, - "attached_condition": "tt2.b1 is not null" + "r_total_filtered": 100, + "attached_condition": "tt2.b1 is not null", + "r_filtered": 100 } }, { @@ -4046,6 +4052,7 @@ ANALYZE "r_table_time_ms": "REPLACED", "r_other_time_ms": "REPLACED", "filtered": 100, + "r_total_filtered": 100, "r_filtered": 100 } } @@ -4233,6 +4240,7 @@ ANALYZE "r_table_time_ms": "REPLACED", "r_other_time_ms": "REPLACED", "filtered": 100, + "r_total_filtered": 100, "r_filtered": 100, "materialized": { "query_block": { @@ -4262,6 +4270,7 @@ ANALYZE "r_other_time_ms": "REPLACED", "r_engine_stats": REPLACED, "filtered": 100, + "r_total_filtered": 100, "r_filtered": 100 } } @@ -4289,8 +4298,9 @@ ANALYZE "r_other_time_ms": "REPLACED", "r_engine_stats": REPLACED, "filtered": 100, - "r_filtered": 100, - "attached_condition": "t1.c is not null" + "r_total_filtered": 100, + "attached_condition": "t1.c is not null", + "r_filtered": 100 } }, { @@ -4310,6 +4320,7 @@ ANALYZE "r_table_time_ms": "REPLACED", "r_other_time_ms": "REPLACED", "filtered": 100, + "r_total_filtered": 100, "r_filtered": 100 } } @@ -4402,6 +4413,7 @@ ANALYZE "r_other_time_ms": "REPLACED", "r_engine_stats": REPLACED, "filtered": 100, + "r_total_filtered": 100, "r_filtered": 100 } } diff --git a/mysql-test/main/derived_cond_pushdown.result b/mysql-test/main/derived_cond_pushdown.result index d91b4510dee04..df17b51656775 100644 --- a/mysql-test/main/derived_cond_pushdown.result +++ b/mysql-test/main/derived_cond_pushdown.result @@ -21495,6 +21495,7 @@ ANALYZE "r_table_time_ms": "REPLACED", "r_other_time_ms": "REPLACED", "filtered": 100, + "r_total_filtered": 100, "r_filtered": 100, "materialized": { "query_block": { @@ -21524,8 +21525,9 @@ ANALYZE "r_other_time_ms": "REPLACED", "r_engine_stats": REPLACED, "filtered": 100, - "r_filtered": 50, - "attached_condition": "t1.a = 3" + "r_total_filtered": 50, + "attached_condition": "t1.a = 3", + "r_filtered": 50 } } ] diff --git a/mysql-test/main/derived_split_innodb.result b/mysql-test/main/derived_split_innodb.result index 2fbb6da2d03e5..5d39a48f100c4 100644 --- a/mysql-test/main/derived_split_innodb.result +++ b/mysql-test/main/derived_split_innodb.result @@ -388,6 +388,7 @@ ANALYZE "r_other_time_ms": "REPLACED", "r_engine_stats": REPLACED, "filtered": 100, + "r_total_filtered": 100, "r_filtered": 100 } }, @@ -409,8 +410,9 @@ ANALYZE "r_other_time_ms": "REPLACED", "r_engine_stats": REPLACED, "filtered": 100, - "r_filtered": 100, - "attached_condition": "trigcond(trigcond(t1.b is not null))" + "r_total_filtered": 100, + "attached_condition": "trigcond(trigcond(t1.b is not null))", + "r_filtered": 100 } }, { @@ -431,8 +433,9 @@ ANALYZE "r_other_time_ms": "REPLACED", "r_engine_stats": REPLACED, "filtered": 100, - "r_filtered": 100, - "attached_condition": "trigcond(trigcond(t1.b is not null))" + "r_total_filtered": 100, + "attached_condition": "trigcond(trigcond(t1.b is not null))", + "r_filtered": 100 } }, { @@ -452,8 +455,9 @@ ANALYZE "r_table_time_ms": "REPLACED", "r_other_time_ms": "REPLACED", "filtered": 100, - "r_filtered": 100, + "r_total_filtered": 100, "attached_condition": "trigcond(trigcond(t1.b is not null))", + "r_filtered": 100, "materialized": { "lateral": 1, "query_block": { @@ -481,6 +485,7 @@ ANALYZE "r_other_time_ms": "REPLACED", "r_engine_stats": REPLACED, "filtered": 100, + "r_total_filtered": 100, "r_filtered": 100 } }, @@ -498,6 +503,7 @@ ANALYZE "r_other_time_ms": "REPLACED", "r_engine_stats": REPLACED, "filtered": 100, + "r_total_filtered": 100, "r_filtered": 100 }, "buffer_type": "flat", diff --git a/mysql-test/main/except.result b/mysql-test/main/except.result index 40a77fcd65025..ee32bae75f5d7 100644 --- a/mysql-test/main/except.result +++ b/mysql-test/main/except.result @@ -108,6 +108,7 @@ ANALYZE "r_other_time_ms": "REPLACED", "r_engine_stats": REPLACED, "filtered": 100, + "r_total_filtered": 100, "r_filtered": 100 } } @@ -135,6 +136,7 @@ ANALYZE "r_other_time_ms": "REPLACED", "r_engine_stats": REPLACED, "filtered": 100, + "r_total_filtered": 100, "r_filtered": 100 } } @@ -169,6 +171,7 @@ ANALYZE "r_table_time_ms": "REPLACED", "r_other_time_ms": "REPLACED", "filtered": 100, + "r_total_filtered": 100, "r_filtered": 100, "materialized": { "query_block": { @@ -198,6 +201,7 @@ ANALYZE "r_other_time_ms": "REPLACED", "r_engine_stats": REPLACED, "filtered": 100, + "r_total_filtered": 100, "r_filtered": 100 } } @@ -225,6 +229,7 @@ ANALYZE "r_other_time_ms": "REPLACED", "r_engine_stats": REPLACED, "filtered": 100, + "r_total_filtered": 100, "r_filtered": 100 } } @@ -407,6 +412,7 @@ ANALYZE "r_other_time_ms": "REPLACED", "r_engine_stats": REPLACED, "filtered": 100, + "r_total_filtered": 100, "r_filtered": 100 } }, @@ -424,6 +430,7 @@ ANALYZE "r_other_time_ms": "REPLACED", "r_engine_stats": REPLACED, "filtered": 100, + "r_total_filtered": 100, "r_filtered": 100 }, "buffer_type": "flat", @@ -460,6 +467,7 @@ ANALYZE "r_other_time_ms": "REPLACED", "r_engine_stats": REPLACED, "filtered": 100, + "r_total_filtered": 100, "r_filtered": 100 } }, @@ -477,6 +485,7 @@ ANALYZE "r_other_time_ms": "REPLACED", "r_engine_stats": REPLACED, "filtered": 100, + "r_total_filtered": 100, "r_filtered": 100 }, "buffer_type": "flat", @@ -521,6 +530,7 @@ ANALYZE "r_table_time_ms": "REPLACED", "r_other_time_ms": "REPLACED", "filtered": 100, + "r_total_filtered": 100, "r_filtered": 100, "materialized": { "query_block": { @@ -550,6 +560,7 @@ ANALYZE "r_other_time_ms": "REPLACED", "r_engine_stats": REPLACED, "filtered": 100, + "r_total_filtered": 100, "r_filtered": 100 } }, @@ -567,6 +578,7 @@ ANALYZE "r_other_time_ms": "REPLACED", "r_engine_stats": REPLACED, "filtered": 100, + "r_total_filtered": 100, "r_filtered": 100 }, "buffer_type": "flat", @@ -603,6 +615,7 @@ ANALYZE "r_other_time_ms": "REPLACED", "r_engine_stats": REPLACED, "filtered": 100, + "r_total_filtered": 100, "r_filtered": 100 } }, @@ -620,6 +633,7 @@ ANALYZE "r_other_time_ms": "REPLACED", "r_engine_stats": REPLACED, "filtered": 100, + "r_total_filtered": 100, "r_filtered": 100 }, "buffer_type": "flat", diff --git a/mysql-test/main/except_all.result b/mysql-test/main/except_all.result index 5806a491caa17..8b620282b19e5 100644 --- a/mysql-test/main/except_all.result +++ b/mysql-test/main/except_all.result @@ -142,6 +142,7 @@ ANALYZE "r_table_time_ms": "REPLACED", "r_other_time_ms": "REPLACED", "filtered": 100, + "r_total_filtered": 100, "r_filtered": 100, "materialized": { "query_block": { @@ -171,6 +172,7 @@ ANALYZE "r_other_time_ms": "REPLACED", "r_engine_stats": REPLACED, "filtered": 100, + "r_total_filtered": 100, "r_filtered": 100 } } @@ -198,6 +200,7 @@ ANALYZE "r_other_time_ms": "REPLACED", "r_engine_stats": REPLACED, "filtered": 100, + "r_total_filtered": 100, "r_filtered": 100 } } @@ -237,6 +240,7 @@ ANALYZE "r_table_time_ms": "REPLACED", "r_other_time_ms": "REPLACED", "filtered": 100, + "r_total_filtered": 100, "r_filtered": 100, "materialized": { "query_block": { @@ -266,6 +270,7 @@ ANALYZE "r_other_time_ms": "REPLACED", "r_engine_stats": REPLACED, "filtered": 100, + "r_total_filtered": 100, "r_filtered": 100 } } @@ -293,6 +298,7 @@ ANALYZE "r_other_time_ms": "REPLACED", "r_engine_stats": REPLACED, "filtered": 100, + "r_total_filtered": 100, "r_filtered": 100 } } @@ -540,6 +546,7 @@ ANALYZE "r_other_time_ms": "REPLACED", "r_engine_stats": REPLACED, "filtered": 100, + "r_total_filtered": 100, "r_filtered": 100 } }, @@ -557,6 +564,7 @@ ANALYZE "r_other_time_ms": "REPLACED", "r_engine_stats": REPLACED, "filtered": 100, + "r_total_filtered": 100, "r_filtered": 100 }, "buffer_type": "flat", @@ -593,6 +601,7 @@ ANALYZE "r_other_time_ms": "REPLACED", "r_engine_stats": REPLACED, "filtered": 100, + "r_total_filtered": 100, "r_filtered": 100 } }, @@ -610,6 +619,7 @@ ANALYZE "r_other_time_ms": "REPLACED", "r_engine_stats": REPLACED, "filtered": 100, + "r_total_filtered": 100, "r_filtered": 100 }, "buffer_type": "flat", @@ -653,6 +663,7 @@ ANALYZE "r_table_time_ms": "REPLACED", "r_other_time_ms": "REPLACED", "filtered": 100, + "r_total_filtered": 100, "r_filtered": 100, "materialized": { "query_block": { @@ -682,6 +693,7 @@ ANALYZE "r_other_time_ms": "REPLACED", "r_engine_stats": REPLACED, "filtered": 100, + "r_total_filtered": 100, "r_filtered": 100 } }, @@ -699,6 +711,7 @@ ANALYZE "r_other_time_ms": "REPLACED", "r_engine_stats": REPLACED, "filtered": 100, + "r_total_filtered": 100, "r_filtered": 100 }, "buffer_type": "flat", @@ -735,6 +748,7 @@ ANALYZE "r_other_time_ms": "REPLACED", "r_engine_stats": REPLACED, "filtered": 100, + "r_total_filtered": 100, "r_filtered": 100 } }, @@ -752,6 +766,7 @@ ANALYZE "r_other_time_ms": "REPLACED", "r_engine_stats": REPLACED, "filtered": 100, + "r_total_filtered": 100, "r_filtered": 100 }, "buffer_type": "flat", diff --git a/mysql-test/main/explain_json.result b/mysql-test/main/explain_json.result index cd55f7ddf659a..31a38ffc9b486 100644 --- a/mysql-test/main/explain_json.result +++ b/mysql-test/main/explain_json.result @@ -1311,6 +1311,7 @@ ANALYZE "r_other_time_ms": "REPLACED", "r_engine_stats": REPLACED, "filtered": 100, + "r_total_filtered": 100, "r_filtered": 100, "using_index_for_group_by": true } @@ -1721,6 +1722,7 @@ ANALYZE "r_rows": null, "r_engine_stats": REPLACED, "filtered": 0, + "r_total_filtered": null, "r_filtered": null, "impossible_on_condition": true } @@ -1738,6 +1740,7 @@ ANALYZE "r_other_time_ms": "REPLACED", "r_engine_stats": REPLACED, "filtered": 100, + "r_total_filtered": 100, "r_filtered": 100 } } @@ -1815,6 +1818,7 @@ ANALYZE "r_other_time_ms": "REPLACED", "r_engine_stats": REPLACED, "filtered": 100, + "r_total_filtered": 100, "r_filtered": 100 } }, @@ -1836,8 +1840,9 @@ ANALYZE "r_other_time_ms": "REPLACED", "r_engine_stats": REPLACED, "filtered": 100, - "r_filtered": 100, + "r_total_filtered": 100, "attached_condition": "trigcond(t2.pk is null) and trigcond(trigcond(t1.a is not null))", + "r_filtered": 100, "using_index": true, "not_exists": true } @@ -1919,8 +1924,9 @@ ANALYZE "r_other_time_ms": "REPLACED", "r_engine_stats": REPLACED, "filtered": 100, - "r_filtered": 100, - "attached_condition": "t1.a is not null" + "r_total_filtered": 100, + "attached_condition": "t1.a is not null", + "r_filtered": 100 } }, { @@ -1941,6 +1947,7 @@ ANALYZE "r_other_time_ms": "REPLACED", "r_engine_stats": REPLACED, "filtered": 100, + "r_total_filtered": 100, "r_filtered": 100, "using_index": true, "distinct": true @@ -2039,8 +2046,9 @@ ANALYZE "r_other_time_ms": "REPLACED", "r_engine_stats": REPLACED, "filtered": 100, - "r_filtered": 100, - "attached_condition": "t3.a is not null" + "r_total_filtered": 100, + "attached_condition": "t3.a is not null", + "r_filtered": 100 } }, { @@ -2062,8 +2070,9 @@ ANALYZE "r_other_time_ms": "REPLACED", "r_engine_stats": REPLACED, "filtered": 100, - "r_filtered": 100, - "index_condition_bka": "t4.b + 1 <= t3.b + 1" + "r_total_filtered": 100, + "index_condition_bka": "t4.b + 1 <= t3.b + 1", + "r_filtered": 100 }, "buffer_type": "flat", "buffer_size": "400", diff --git a/mysql-test/main/explain_json_format_partitions.result b/mysql-test/main/explain_json_format_partitions.result index 6cdac94f20c55..2ad33b3783b7d 100644 --- a/mysql-test/main/explain_json_format_partitions.result +++ b/mysql-test/main/explain_json_format_partitions.result @@ -55,8 +55,9 @@ ANALYZE "r_other_time_ms": "REPLACED", "r_engine_stats": REPLACED, "filtered": 100, - "r_filtered": 30, - "attached_condition": "t1.a in (2,3,4)" + "r_total_filtered": 30, + "attached_condition": "t1.a in (2,3,4)", + "r_filtered": 30 } } ] @@ -79,10 +80,11 @@ ANALYZE "access_type": "ALL", "rows": 10, "r_rows": 10, - "r_filtered": 30, + "r_total_filtered": 30, "r_total_time_ms": "REPLACED", "r_engine_stats": REPLACED, - "attached_condition": "t1.a in (2,3,4)" + "attached_condition": "t1.a in (2,3,4)", + "r_filtered": 30 } } } @@ -103,10 +105,11 @@ ANALYZE "access_type": "ALL", "rows": 10, "r_rows": 10, - "r_filtered": 0, + "r_total_filtered": 0, "r_total_time_ms": "REPLACED", "r_engine_stats": REPLACED, - "attached_condition": "t1.a in (20,30,40)" + "attached_condition": "t1.a in (20,30,40)", + "r_filtered": 0 } } } diff --git a/mysql-test/main/fetch_first.result b/mysql-test/main/fetch_first.result index 74ac8cc10f5d0..297603491a879 100644 --- a/mysql-test/main/fetch_first.result +++ b/mysql-test/main/fetch_first.result @@ -474,6 +474,7 @@ ANALYZE "r_other_time_ms": "REPLACED", "r_engine_stats": REPLACED, "filtered": 100, + "r_total_filtered": 100, "r_filtered": 100 } } diff --git a/mysql-test/main/intersect.result b/mysql-test/main/intersect.result index a71da056e8f02..dc2f7f5153be5 100644 --- a/mysql-test/main/intersect.result +++ b/mysql-test/main/intersect.result @@ -141,6 +141,7 @@ ANALYZE "r_other_time_ms": "REPLACED", "r_engine_stats": REPLACED, "filtered": 100, + "r_total_filtered": 100, "r_filtered": 100 } } @@ -168,6 +169,7 @@ ANALYZE "r_other_time_ms": "REPLACED", "r_engine_stats": REPLACED, "filtered": 100, + "r_total_filtered": 100, "r_filtered": 100 } } @@ -195,6 +197,7 @@ ANALYZE "r_other_time_ms": "REPLACED", "r_engine_stats": REPLACED, "filtered": 100, + "r_total_filtered": 100, "r_filtered": 100 } } @@ -229,6 +232,7 @@ ANALYZE "r_table_time_ms": "REPLACED", "r_other_time_ms": "REPLACED", "filtered": 100, + "r_total_filtered": 100, "r_filtered": 100, "materialized": { "query_block": { @@ -258,6 +262,7 @@ ANALYZE "r_other_time_ms": "REPLACED", "r_engine_stats": REPLACED, "filtered": 100, + "r_total_filtered": 100, "r_filtered": 100 } } @@ -285,6 +290,7 @@ ANALYZE "r_other_time_ms": "REPLACED", "r_engine_stats": REPLACED, "filtered": 100, + "r_total_filtered": 100, "r_filtered": 100 } } @@ -312,6 +318,7 @@ ANALYZE "r_other_time_ms": "REPLACED", "r_engine_stats": REPLACED, "filtered": 100, + "r_total_filtered": 100, "r_filtered": 100 } } @@ -468,6 +475,7 @@ ANALYZE "r_other_time_ms": "REPLACED", "r_engine_stats": REPLACED, "filtered": 100, + "r_total_filtered": 100, "r_filtered": 100 } } @@ -495,6 +503,7 @@ ANALYZE "r_other_time_ms": "REPLACED", "r_engine_stats": REPLACED, "filtered": 100, + "r_total_filtered": 100, "r_filtered": 100 } }, @@ -512,6 +521,7 @@ ANALYZE "r_other_time_ms": "REPLACED", "r_engine_stats": REPLACED, "filtered": 100, + "r_total_filtered": 100, "r_filtered": 100 }, "buffer_type": "flat", @@ -555,6 +565,7 @@ ANALYZE "r_table_time_ms": "REPLACED", "r_other_time_ms": "REPLACED", "filtered": 100, + "r_total_filtered": 100, "r_filtered": 100, "materialized": { "query_block": { @@ -584,6 +595,7 @@ ANALYZE "r_other_time_ms": "REPLACED", "r_engine_stats": REPLACED, "filtered": 100, + "r_total_filtered": 100, "r_filtered": 100 } } @@ -611,6 +623,7 @@ ANALYZE "r_other_time_ms": "REPLACED", "r_engine_stats": REPLACED, "filtered": 100, + "r_total_filtered": 100, "r_filtered": 100 } }, @@ -628,6 +641,7 @@ ANALYZE "r_other_time_ms": "REPLACED", "r_engine_stats": REPLACED, "filtered": 100, + "r_total_filtered": 100, "r_filtered": 100 }, "buffer_type": "flat", diff --git a/mysql-test/main/intersect_all.result b/mysql-test/main/intersect_all.result index ad4ade45862ae..27c796bb3f02f 100644 --- a/mysql-test/main/intersect_all.result +++ b/mysql-test/main/intersect_all.result @@ -153,6 +153,7 @@ ANALYZE "r_other_time_ms": "REPLACED", "r_engine_stats": REPLACED, "filtered": 100, + "r_total_filtered": 100, "r_filtered": 100 } } @@ -180,6 +181,7 @@ ANALYZE "r_other_time_ms": "REPLACED", "r_engine_stats": REPLACED, "filtered": 100, + "r_total_filtered": 100, "r_filtered": 100 } } @@ -207,6 +209,7 @@ ANALYZE "r_other_time_ms": "REPLACED", "r_engine_stats": REPLACED, "filtered": 100, + "r_total_filtered": 100, "r_filtered": 100 } } @@ -241,6 +244,7 @@ ANALYZE "r_table_time_ms": "REPLACED", "r_other_time_ms": "REPLACED", "filtered": 100, + "r_total_filtered": 100, "r_filtered": 100, "materialized": { "query_block": { @@ -270,6 +274,7 @@ ANALYZE "r_other_time_ms": "REPLACED", "r_engine_stats": REPLACED, "filtered": 100, + "r_total_filtered": 100, "r_filtered": 100 } } @@ -297,6 +302,7 @@ ANALYZE "r_other_time_ms": "REPLACED", "r_engine_stats": REPLACED, "filtered": 100, + "r_total_filtered": 100, "r_filtered": 100 } } @@ -324,6 +330,7 @@ ANALYZE "r_other_time_ms": "REPLACED", "r_engine_stats": REPLACED, "filtered": 100, + "r_total_filtered": 100, "r_filtered": 100 } } @@ -499,6 +506,7 @@ ANALYZE "r_other_time_ms": "REPLACED", "r_engine_stats": REPLACED, "filtered": 100, + "r_total_filtered": 100, "r_filtered": 100 } } @@ -526,6 +534,7 @@ ANALYZE "r_other_time_ms": "REPLACED", "r_engine_stats": REPLACED, "filtered": 100, + "r_total_filtered": 100, "r_filtered": 100 } }, @@ -543,6 +552,7 @@ ANALYZE "r_other_time_ms": "REPLACED", "r_engine_stats": REPLACED, "filtered": 100, + "r_total_filtered": 100, "r_filtered": 100 }, "buffer_type": "flat", @@ -586,6 +596,7 @@ ANALYZE "r_table_time_ms": "REPLACED", "r_other_time_ms": "REPLACED", "filtered": 100, + "r_total_filtered": 100, "r_filtered": 100, "materialized": { "query_block": { @@ -615,6 +626,7 @@ ANALYZE "r_other_time_ms": "REPLACED", "r_engine_stats": REPLACED, "filtered": 100, + "r_total_filtered": 100, "r_filtered": 100 } } @@ -642,6 +654,7 @@ ANALYZE "r_other_time_ms": "REPLACED", "r_engine_stats": REPLACED, "filtered": 100, + "r_total_filtered": 100, "r_filtered": 100 } }, @@ -659,6 +672,7 @@ ANALYZE "r_other_time_ms": "REPLACED", "r_engine_stats": REPLACED, "filtered": 100, + "r_total_filtered": 100, "r_filtered": 100 }, "buffer_type": "flat", diff --git a/mysql-test/main/join_cache_debug.result b/mysql-test/main/join_cache_debug.result index 0f66550ff26b7..8aaad53b41a95 100644 --- a/mysql-test/main/join_cache_debug.result +++ b/mysql-test/main/join_cache_debug.result @@ -57,6 +57,7 @@ JSON "r_other_time_ms": "REPLACED", "r_engine_stats": REPLACED, "filtered": 100, + "r_total_filtered": 100, "r_filtered": 100 } }, @@ -79,8 +80,9 @@ JSON "r_other_time_ms": "REPLACED", "r_engine_stats": REPLACED, "filtered": 100, - "r_filtered": 100, + "r_total_filtered": 100, "attached_condition": "trigcond(t1_t2.t2_d = t3.c and trigcond(t1_t2.t2_d is not null))", + "r_filtered": 100, "using_index": true } }, @@ -101,6 +103,7 @@ JSON "r_other_time_ms": "REPLACED", "r_engine_stats": REPLACED, "filtered": 100, + "r_total_filtered": 100, "r_filtered": 100, "using_index": true }, diff --git a/mysql-test/main/order_by.result b/mysql-test/main/order_by.result index 3e6460ae653e2..3314c47c32bce 100644 --- a/mysql-test/main/order_by.result +++ b/mysql-test/main/order_by.result @@ -1596,8 +1596,9 @@ ANALYZE "r_other_time_ms": "REPLACED", "r_engine_stats": REPLACED, "filtered": 50, - "r_filtered": 100, + "r_total_filtered": 100, "attached_condition": "t1.c = 10 or t1.c is null", + "r_filtered": 100, "using_index": true } } @@ -3486,6 +3487,7 @@ ANALYZE "r_other_time_ms": "REPLACED", "r_engine_stats": REPLACED, "filtered": 100, + "r_total_filtered": 100, "r_filtered": 100 } } @@ -3984,6 +3986,7 @@ ANALYZE "r_other_time_ms": "REPLACED", "r_engine_stats": REPLACED, "filtered": 100, + "r_total_filtered": 100, "r_filtered": 100 } } @@ -4154,6 +4157,7 @@ ANALYZE "r_other_time_ms": "REPLACED", "r_engine_stats": REPLACED, "filtered": 100, + "r_total_filtered": 100, "r_filtered": 100 } } @@ -4207,6 +4211,7 @@ ANALYZE "r_other_time_ms": "REPLACED", "r_engine_stats": REPLACED, "filtered": 100, + "r_total_filtered": 100, "r_filtered": 100 } } @@ -4266,6 +4271,7 @@ ANALYZE "r_other_time_ms": "REPLACED", "r_engine_stats": REPLACED, "filtered": 100, + "r_total_filtered": 100, "r_filtered": 100 } } @@ -4339,6 +4345,7 @@ ANALYZE "r_other_time_ms": "REPLACED", "r_engine_stats": REPLACED, "filtered": 100, + "r_total_filtered": 100, "r_filtered": 100 } } @@ -4515,6 +4522,7 @@ ANALYZE "r_other_time_ms": "REPLACED", "r_engine_stats": REPLACED, "filtered": 100, + "r_total_filtered": 100, "r_filtered": 100 } } @@ -4552,8 +4560,9 @@ ANALYZE "r_other_time_ms": "REPLACED", "r_engine_stats": REPLACED, "filtered": 100, - "r_filtered": 2, - "attached_condition": "t1.b = t2.b" + "r_total_filtered": 2, + "attached_condition": "t1.b = t2.b", + "r_filtered": 2 } } ] diff --git a/mysql-test/main/order_by_pack_big.result b/mysql-test/main/order_by_pack_big.result index f7b9deeb31230..58b3e78902565 100644 --- a/mysql-test/main/order_by_pack_big.result +++ b/mysql-test/main/order_by_pack_big.result @@ -121,6 +121,7 @@ ANALYZE "r_other_time_ms": "REPLACED", "r_engine_stats": REPLACED, "filtered": 100, + "r_total_filtered": 100, "r_filtered": 100 } } @@ -290,6 +291,7 @@ ANALYZE "r_other_time_ms": "REPLACED", "r_engine_stats": REPLACED, "filtered": 100, + "r_total_filtered": 100, "r_filtered": 100 } } @@ -455,6 +457,7 @@ ANALYZE "r_other_time_ms": "REPLACED", "r_engine_stats": REPLACED, "filtered": 100, + "r_total_filtered": 100, "r_filtered": 100 } } @@ -515,6 +518,7 @@ ANALYZE "r_other_time_ms": "REPLACED", "r_engine_stats": REPLACED, "filtered": 100, + "r_total_filtered": 100, "r_filtered": 100 } } diff --git a/mysql-test/main/rowid_filter.result b/mysql-test/main/rowid_filter.result index 0bd4bb6ac5720..e444a23c0392a 100644 --- a/mysql-test/main/rowid_filter.result +++ b/mysql-test/main/rowid_filter.result @@ -149,16 +149,18 @@ ANALYZE "loops": 1, "r_loops": 1, "rows": 426, + "r_index_rows": 349, "r_rows": 34, "cost": "REPLACED", "r_table_time_ms": "REPLACED", "r_other_time_ms": "REPLACED", "r_engine_stats": REPLACED, - "r_icp_filtered": 100, "filtered": 8.476269722, - "r_filtered": 100, + "r_total_filtered": 9.742120344, "index_condition": "lineitem.l_quantity > 47", - "attached_condition": "lineitem.l_shipDATE between '1997-01-01' and '1997-06-30'" + "r_icp_filtered": 100, + "attached_condition": "lineitem.l_shipDATE between '1997-01-01' and '1997-06-30'", + "r_filtered": 100 } } ] @@ -265,16 +267,18 @@ ANALYZE "loops": 1, "r_loops": 1, "rows": 426, + "r_index_rows": 349, "r_rows": 349, "cost": "REPLACED", "r_table_time_ms": "REPLACED", "r_other_time_ms": "REPLACED", "r_engine_stats": REPLACED, - "r_icp_filtered": 100, "filtered": 8.476269722, - "r_filtered": 9.742120344, + "r_total_filtered": 9.742120344, "index_condition": "lineitem.l_quantity > 47", - "attached_condition": "lineitem.l_shipDATE between '1997-01-01' and '1997-06-30'" + "r_icp_filtered": 100, + "attached_condition": "lineitem.l_shipDATE between '1997-01-01' and '1997-06-30'", + "r_filtered": 9.742120344 } } ] @@ -415,15 +419,17 @@ ANALYZE "loops": 1, "r_loops": 1, "rows": 69, + "r_index_rows": 71, "r_rows": 71, "cost": "REPLACED", "r_table_time_ms": "REPLACED", "r_other_time_ms": "REPLACED", "r_engine_stats": REPLACED, - "r_icp_filtered": 100, "filtered": 100, - "r_filtered": 100, - "index_condition": "orders.o_totalprice between 200000 and 230000" + "r_total_filtered": 100, + "index_condition": "orders.o_totalprice between 200000 and 230000", + "r_icp_filtered": 100, + "r_filtered": 100 } }, { @@ -456,14 +462,16 @@ ANALYZE "loops": 69, "r_loops": 71, "rows": 4, + "r_index_rows": 6.704225352, "r_rows": 0.154929577, "cost": "REPLACED", "r_table_time_ms": "REPLACED", "r_other_time_ms": "REPLACED", "r_engine_stats": REPLACED, "filtered": 1.631973386, - "r_filtered": 100, - "attached_condition": "lineitem.l_shipDATE between '1997-01-01' and '1997-01-31'" + "r_total_filtered": 2.31092437, + "attached_condition": "lineitem.l_shipDATE between '1997-01-01' and '1997-01-31'", + "r_filtered": 100 } } ] @@ -579,15 +587,17 @@ ANALYZE "loops": 1, "r_loops": 1, "rows": 98, + "r_index_rows": 98, "r_rows": 98, "cost": "REPLACED", "r_table_time_ms": "REPLACED", "r_other_time_ms": "REPLACED", "r_engine_stats": REPLACED, - "r_icp_filtered": 100, "filtered": 100, - "r_filtered": 100, - "index_condition": "lineitem.l_shipDATE between '1997-01-01' and '1997-01-31'" + "r_total_filtered": 100, + "index_condition": "lineitem.l_shipDATE between '1997-01-01' and '1997-01-31'", + "r_icp_filtered": 100, + "r_filtered": 100 } }, { @@ -609,8 +619,9 @@ ANALYZE "r_other_time_ms": "REPLACED", "r_engine_stats": REPLACED, "filtered": 4.599999905, - "r_filtered": 11.2244898, - "attached_condition": "orders.o_totalprice between 200000 and 230000" + "r_total_filtered": 11.2244898, + "attached_condition": "orders.o_totalprice between 200000 and 230000", + "r_filtered": 11.2244898 } } ] @@ -762,16 +773,18 @@ ANALYZE "loops": 1, "r_loops": 1, "rows": 426, + "r_index_rows": 349, "r_rows": 34, "cost": "REPLACED", "r_table_time_ms": "REPLACED", "r_other_time_ms": "REPLACED", "r_engine_stats": REPLACED, - "r_icp_filtered": 100, "filtered": 8.476269722, - "r_filtered": 100, + "r_total_filtered": 9.742120344, "index_condition": "lineitem.l_quantity > 47", - "attached_condition": "lineitem.l_shipDATE between '1997-01-01' and '1997-06-30'" + "r_icp_filtered": 100, + "attached_condition": "lineitem.l_shipDATE between '1997-01-01' and '1997-06-30'", + "r_filtered": 100 } }, { @@ -799,14 +812,16 @@ ANALYZE "loops": 36.10890924, "r_loops": 34, "rows": 1, + "r_index_rows": 1, "r_rows": 0.264705882, "cost": "REPLACED", "r_table_time_ms": "REPLACED", "r_other_time_ms": "REPLACED", "r_engine_stats": REPLACED, "filtered": 9.266666412, - "r_filtered": 100, - "attached_condition": "orders.o_totalprice between 180000 and 230000" + "r_total_filtered": 26.47058824, + "attached_condition": "orders.o_totalprice between 180000 and 230000", + "r_filtered": 100 } } ] @@ -928,16 +943,18 @@ ANALYZE "loops": 1, "r_loops": 1, "rows": 426, + "r_index_rows": 349, "r_rows": 349, "cost": "REPLACED", "r_table_time_ms": "REPLACED", "r_other_time_ms": "REPLACED", "r_engine_stats": REPLACED, - "r_icp_filtered": 100, "filtered": 8.476269722, - "r_filtered": 9.742120344, + "r_total_filtered": 9.742120344, "index_condition": "lineitem.l_quantity > 47", - "attached_condition": "lineitem.l_shipDATE between '1997-01-01' and '1997-06-30'" + "r_icp_filtered": 100, + "attached_condition": "lineitem.l_shipDATE between '1997-01-01' and '1997-06-30'", + "r_filtered": 9.742120344 } }, { @@ -958,8 +975,9 @@ ANALYZE "r_other_time_ms": "REPLACED", "r_engine_stats": REPLACED, "filtered": 9.266666412, - "r_filtered": 26.47058824, - "attached_condition": "orders.o_totalprice between 180000 and 230000" + "r_total_filtered": 26.47058824, + "attached_condition": "orders.o_totalprice between 180000 and 230000", + "r_filtered": 26.47058824 } } ] @@ -1085,15 +1103,17 @@ ANALYZE "loops": 1, "r_loops": 1, "rows": 69, + "r_index_rows": 71, "r_rows": 71, "cost": "REPLACED", "r_table_time_ms": "REPLACED", "r_other_time_ms": "REPLACED", "r_engine_stats": REPLACED, - "r_icp_filtered": 100, "filtered": 100, - "r_filtered": 100, - "index_condition": "orders.o_totalprice between 200000 and 230000" + "r_total_filtered": 100, + "index_condition": "orders.o_totalprice between 200000 and 230000", + "r_icp_filtered": 100, + "r_filtered": 100 } }, { @@ -1126,14 +1146,16 @@ ANALYZE "loops": 69, "r_loops": 71, "rows": 4, + "r_index_rows": 6.704225352, "r_rows": 0.521126761, "cost": "REPLACED", "r_table_time_ms": "REPLACED", "r_other_time_ms": "REPLACED", "r_engine_stats": REPLACED, "filtered": 8.476269722, - "r_filtered": 100, - "attached_condition": "lineitem.l_shipDATE between '1997-01-01' and '1997-06-30'" + "r_total_filtered": 7.773109244, + "attached_condition": "lineitem.l_shipDATE between '1997-01-01' and '1997-06-30'", + "r_filtered": 100 } } ] @@ -1270,15 +1292,17 @@ ANALYZE "loops": 1, "r_loops": 1, "rows": 69, + "r_index_rows": 71, "r_rows": 71, "cost": "REPLACED", "r_table_time_ms": "REPLACED", "r_other_time_ms": "REPLACED", "r_engine_stats": REPLACED, - "r_icp_filtered": 100, "filtered": 100, - "r_filtered": 100, - "index_condition": "orders.o_totalprice between 200000 and 230000" + "r_total_filtered": 100, + "index_condition": "orders.o_totalprice between 200000 and 230000", + "r_icp_filtered": 100, + "r_filtered": 100 } }, { @@ -1304,8 +1328,9 @@ ANALYZE "r_other_time_ms": "REPLACED", "r_engine_stats": REPLACED, "filtered": 8.476269722, - "r_filtered": 7.773109244, - "attached_condition": "lineitem.l_shipDATE between '1997-01-01' and '1997-06-30'" + "r_total_filtered": 7.773109244, + "attached_condition": "lineitem.l_shipDATE between '1997-01-01' and '1997-06-30'", + "r_filtered": 7.773109244 } } ] @@ -1465,16 +1490,18 @@ ANALYZE "loops": 1, "r_loops": 1, "rows": 18, + "r_index_rows": 18, "r_rows": 18, "cost": "REPLACED", "r_table_time_ms": "REPLACED", "r_other_time_ms": "REPLACED", "r_engine_stats": REPLACED, - "r_icp_filtered": 100, "filtered": 0.566194832, - "r_filtered": 38.88888889, + "r_total_filtered": 38.88888889, "index_condition": "lineitem.l_receiptDATE between '1996-10-05' and '1996-10-10'", - "attached_condition": "lineitem.l_shipDATE between '1996-10-01' and '1996-10-10'" + "r_icp_filtered": 100, + "attached_condition": "lineitem.l_shipDATE between '1996-10-01' and '1996-10-10'", + "r_filtered": 38.88888889 } }, { @@ -1495,8 +1522,9 @@ ANALYZE "r_other_time_ms": "REPLACED", "r_engine_stats": REPLACED, "filtered": 7.466666698, - "r_filtered": 14.28571429, - "attached_condition": "orders.o_totalprice between 200000 and 250000" + "r_total_filtered": 14.28571429, + "attached_condition": "orders.o_totalprice between 200000 and 250000", + "r_filtered": 14.28571429 } } ] @@ -1615,16 +1643,18 @@ ANALYZE "loops": 1, "r_loops": 1, "rows": 18, + "r_index_rows": 18, "r_rows": 18, "cost": "REPLACED", "r_table_time_ms": "REPLACED", "r_other_time_ms": "REPLACED", "r_engine_stats": REPLACED, - "r_icp_filtered": 100, "filtered": 0.566194832, - "r_filtered": 38.88888889, + "r_total_filtered": 38.88888889, "index_condition": "lineitem.l_receiptDATE between '1996-10-05' and '1996-10-10'", - "attached_condition": "lineitem.l_shipDATE between '1996-10-01' and '1996-10-10'" + "r_icp_filtered": 100, + "attached_condition": "lineitem.l_shipDATE between '1996-10-01' and '1996-10-10'", + "r_filtered": 38.88888889 } }, { @@ -1645,8 +1675,9 @@ ANALYZE "r_other_time_ms": "REPLACED", "r_engine_stats": REPLACED, "filtered": 7.466666698, - "r_filtered": 14.28571429, - "attached_condition": "orders.o_totalprice between 200000 and 250000" + "r_total_filtered": 14.28571429, + "attached_condition": "orders.o_totalprice between 200000 and 250000", + "r_filtered": 14.28571429 } } ] @@ -1765,16 +1796,18 @@ ANALYZE "loops": 1, "r_loops": 1, "rows": 39, + "r_index_rows": 41, "r_rows": 41, "cost": "REPLACED", "r_table_time_ms": "REPLACED", "r_other_time_ms": "REPLACED", "r_engine_stats": REPLACED, - "r_icp_filtered": 100, "filtered": 3.200000048, - "r_filtered": 2.43902439, + "r_total_filtered": 2.43902439, "index_condition": "orders.o_totaldiscount between 18000 and 20000", - "attached_condition": "orders.o_totalprice between 200000 and 220000" + "r_icp_filtered": 100, + "attached_condition": "orders.o_totalprice between 200000 and 220000", + "r_filtered": 2.43902439 } }, { @@ -1800,8 +1833,9 @@ ANALYZE "r_other_time_ms": "REPLACED", "r_engine_stats": REPLACED, "filtered": 3.047460556, - "r_filtered": 66.66666667, - "attached_condition": "lineitem.l_shipDATE between '1996-10-01' and '1996-12-01'" + "r_total_filtered": 66.66666667, + "attached_condition": "lineitem.l_shipDATE between '1996-10-01' and '1996-12-01'", + "r_filtered": 66.66666667 } } ] @@ -1916,16 +1950,18 @@ ANALYZE "loops": 1, "r_loops": 1, "rows": 39, + "r_index_rows": 41, "r_rows": 41, "cost": "REPLACED", "r_table_time_ms": "REPLACED", "r_other_time_ms": "REPLACED", "r_engine_stats": REPLACED, - "r_icp_filtered": 100, "filtered": 3.200000048, - "r_filtered": 2.43902439, + "r_total_filtered": 2.43902439, "index_condition": "orders.o_totaldiscount between 18000 and 20000", - "attached_condition": "orders.o_totalprice between 200000 and 220000" + "r_icp_filtered": 100, + "attached_condition": "orders.o_totalprice between 200000 and 220000", + "r_filtered": 2.43902439 } }, { @@ -1951,8 +1987,9 @@ ANALYZE "r_other_time_ms": "REPLACED", "r_engine_stats": REPLACED, "filtered": 3.047460556, - "r_filtered": 66.66666667, - "attached_condition": "lineitem.l_shipDATE between '1996-10-01' and '1996-12-01'" + "r_total_filtered": 66.66666667, + "attached_condition": "lineitem.l_shipDATE between '1996-10-01' and '1996-12-01'", + "r_filtered": 66.66666667 } } ] @@ -2080,16 +2117,18 @@ ANALYZE "loops": 1, "r_loops": 1, "rows": 39, + "r_index_rows": 41, "r_rows": 41, "cost": "REPLACED", "r_table_time_ms": "REPLACED", "r_other_time_ms": "REPLACED", "r_engine_stats": {}, - "r_icp_filtered": 100, "filtered": "REPLACED", - "r_filtered": 2.43902439, + "r_total_filtered": 2.43902439, "index_condition": "orders.o_totaldiscount between 18000 and 20000", - "attached_condition": "orders.o_totalprice between 200000 and 220000 and orders.o_orderDATE between '1992-12-01' and '1997-01-01'" + "r_icp_filtered": 100, + "attached_condition": "orders.o_totalprice between 200000 and 220000 and orders.o_orderDATE between '1992-12-01' and '1997-01-01'", + "r_filtered": 2.43902439 } }, { @@ -2115,8 +2154,9 @@ ANALYZE "r_other_time_ms": "REPLACED", "r_engine_stats": {}, "filtered": "REPLACED", - "r_filtered": 66.66666667, - "attached_condition": "lineitem.l_shipDATE between '1996-10-01' and '1996-12-01'" + "r_total_filtered": 66.66666667, + "attached_condition": "lineitem.l_shipDATE between '1996-10-01' and '1996-12-01'", + "r_filtered": 66.66666667 } } ] @@ -2241,16 +2281,18 @@ ANALYZE "loops": 1, "r_loops": 1, "rows": 39, + "r_index_rows": 41, "r_rows": 41, "cost": "REPLACED", "r_table_time_ms": "REPLACED", "r_other_time_ms": "REPLACED", "r_engine_stats": {}, - "r_icp_filtered": 100, "filtered": "REPLACED", - "r_filtered": 2.43902439, + "r_total_filtered": 2.43902439, "index_condition": "orders.o_totaldiscount between 18000 and 20000", - "attached_condition": "orders.o_totalprice between 200000 and 220000 and orders.o_orderDATE between '1992-12-01' and '1997-01-01'" + "r_icp_filtered": 100, + "attached_condition": "orders.o_totalprice between 200000 and 220000 and orders.o_orderDATE between '1992-12-01' and '1997-01-01'", + "r_filtered": 2.43902439 } }, { @@ -2276,8 +2318,9 @@ ANALYZE "r_other_time_ms": "REPLACED", "r_engine_stats": {}, "filtered": "REPLACED", - "r_filtered": 66.66666667, - "attached_condition": "lineitem.l_shipDATE between '1996-10-01' and '1996-12-01'" + "r_total_filtered": 66.66666667, + "attached_condition": "lineitem.l_shipDATE between '1996-10-01' and '1996-12-01'", + "r_filtered": 66.66666667 } } ] diff --git a/mysql-test/main/rowid_filter_aria.result b/mysql-test/main/rowid_filter_aria.result index 98ae536023237..f9c574e0461f0 100644 --- a/mysql-test/main/rowid_filter_aria.result +++ b/mysql-test/main/rowid_filter_aria.result @@ -150,16 +150,18 @@ ANALYZE "loops": 1, "r_loops": 1, "rows": 482, + "r_index_rows": 510, "r_rows": 34, "cost": "REPLACED", "r_table_time_ms": "REPLACED", "r_other_time_ms": "REPLACED", "r_engine_stats": REPLACED, - "r_icp_filtered": 100, "filtered": 11.80682755, - "r_filtered": 100, + "r_total_filtered": 6.666666667, "index_condition": "lineitem.l_shipDATE between '1997-01-01' and '1997-06-30'", - "attached_condition": "lineitem.l_quantity > 47" + "r_icp_filtered": 100, + "attached_condition": "lineitem.l_quantity > 47", + "r_filtered": 100 } } ] @@ -266,16 +268,18 @@ ANALYZE "loops": 1, "r_loops": 1, "rows": 482, + "r_index_rows": 510, "r_rows": 510, "cost": "REPLACED", "r_table_time_ms": "REPLACED", "r_other_time_ms": "REPLACED", "r_engine_stats": REPLACED, - "r_icp_filtered": 100, "filtered": 11.80682755, - "r_filtered": 6.666666667, + "r_total_filtered": 6.666666667, "index_condition": "lineitem.l_shipDATE between '1997-01-01' and '1997-06-30'", - "attached_condition": "lineitem.l_quantity > 47" + "r_icp_filtered": 100, + "attached_condition": "lineitem.l_quantity > 47", + "r_filtered": 6.666666667 } } ] @@ -421,15 +425,17 @@ ANALYZE "loops": 1, "r_loops": 1, "rows": 92, + "r_index_rows": 98, "r_rows": 98, "cost": "REPLACED", "r_table_time_ms": "REPLACED", "r_other_time_ms": "REPLACED", "r_engine_stats": REPLACED, - "r_icp_filtered": 100, "filtered": 100, - "r_filtered": 100, - "index_condition": "lineitem.l_shipDATE between '1997-01-01' and '1997-01-31'" + "r_total_filtered": 100, + "index_condition": "lineitem.l_shipDATE between '1997-01-01' and '1997-01-31'", + "r_icp_filtered": 100, + "r_filtered": 100 } }, { @@ -458,14 +464,16 @@ ANALYZE "r_loops": 98, "r_table_loops": 96, "rows": 1, + "r_index_rows": 0.979591837, "r_rows": 0.112244898, "cost": "REPLACED", "r_table_time_ms": "REPLACED", "r_other_time_ms": "REPLACED", "r_engine_stats": REPLACED, "filtered": 7.066666603, - "r_filtered": 100, - "attached_condition": "orders.o_totalprice between 200000 and 230000" + "r_total_filtered": 11.45833333, + "attached_condition": "orders.o_totalprice between 200000 and 230000", + "r_filtered": 100 } } ] @@ -581,15 +589,17 @@ ANALYZE "loops": 1, "r_loops": 1, "rows": 92, + "r_index_rows": 98, "r_rows": 98, "cost": "REPLACED", "r_table_time_ms": "REPLACED", "r_other_time_ms": "REPLACED", "r_engine_stats": REPLACED, - "r_icp_filtered": 100, "filtered": 100, - "r_filtered": 100, - "index_condition": "lineitem.l_shipDATE between '1997-01-01' and '1997-01-31'" + "r_total_filtered": 100, + "index_condition": "lineitem.l_shipDATE between '1997-01-01' and '1997-01-31'", + "r_icp_filtered": 100, + "r_filtered": 100 } }, { @@ -611,8 +621,9 @@ ANALYZE "r_other_time_ms": "REPLACED", "r_engine_stats": REPLACED, "filtered": 7.066666603, - "r_filtered": 11.2244898, - "attached_condition": "orders.o_totalprice between 200000 and 230000" + "r_total_filtered": 11.2244898, + "attached_condition": "orders.o_totalprice between 200000 and 230000", + "r_filtered": 11.2244898 } } ] @@ -756,16 +767,18 @@ ANALYZE "loops": 1, "r_loops": 1, "rows": 482, + "r_index_rows": 510, "r_rows": 34, "cost": "REPLACED", "r_table_time_ms": "REPLACED", "r_other_time_ms": "REPLACED", "r_engine_stats": REPLACED, - "r_icp_filtered": 100, "filtered": 11.80682755, - "r_filtered": 100, + "r_total_filtered": 6.666666667, "index_condition": "lineitem.l_shipDATE between '1997-01-01' and '1997-06-30'", - "attached_condition": "lineitem.l_quantity > 47" + "r_icp_filtered": 100, + "attached_condition": "lineitem.l_quantity > 47", + "r_filtered": 100 } }, { @@ -787,8 +800,9 @@ ANALYZE "r_other_time_ms": "REPLACED", "r_engine_stats": REPLACED, "filtered": 14.39999962, - "r_filtered": 26.47058824, - "attached_condition": "orders.o_totalprice between 180000 and 230000" + "r_total_filtered": 26.47058824, + "attached_condition": "orders.o_totalprice between 180000 and 230000", + "r_filtered": 26.47058824 } } ] @@ -910,16 +924,18 @@ ANALYZE "loops": 1, "r_loops": 1, "rows": 482, + "r_index_rows": 510, "r_rows": 510, "cost": "REPLACED", "r_table_time_ms": "REPLACED", "r_other_time_ms": "REPLACED", "r_engine_stats": REPLACED, - "r_icp_filtered": 100, "filtered": 11.80682755, - "r_filtered": 6.666666667, + "r_total_filtered": 6.666666667, "index_condition": "lineitem.l_shipDATE between '1997-01-01' and '1997-06-30'", - "attached_condition": "lineitem.l_quantity > 47" + "r_icp_filtered": 100, + "attached_condition": "lineitem.l_quantity > 47", + "r_filtered": 6.666666667 } }, { @@ -941,8 +957,9 @@ ANALYZE "r_other_time_ms": "REPLACED", "r_engine_stats": REPLACED, "filtered": 14.39999962, - "r_filtered": 26.47058824, - "attached_condition": "orders.o_totalprice between 180000 and 230000" + "r_total_filtered": 26.47058824, + "attached_condition": "orders.o_totalprice between 180000 and 230000", + "r_filtered": 26.47058824 } } ] @@ -1068,15 +1085,17 @@ ANALYZE "loops": 1, "r_loops": 1, "rows": 106, + "r_index_rows": 71, "r_rows": 71, "cost": "REPLACED", "r_table_time_ms": "REPLACED", "r_other_time_ms": "REPLACED", "r_engine_stats": REPLACED, - "r_icp_filtered": 100, "filtered": 100, - "r_filtered": 100, - "index_condition": "orders.o_totalprice between 200000 and 230000" + "r_total_filtered": 100, + "index_condition": "orders.o_totalprice between 200000 and 230000", + "r_icp_filtered": 100, + "r_filtered": 100 } }, { @@ -1109,14 +1128,16 @@ ANALYZE "loops": 106, "r_loops": 71, "rows": 4, + "r_index_rows": 6.704225352, "r_rows": 0.521126761, "cost": "REPLACED", "r_table_time_ms": "REPLACED", "r_other_time_ms": "REPLACED", "r_engine_stats": REPLACED, "filtered": 8.026644707, - "r_filtered": 100, - "attached_condition": "lineitem.l_shipDATE between '1997-01-01' and '1997-06-30'" + "r_total_filtered": 7.773109244, + "attached_condition": "lineitem.l_shipDATE between '1997-01-01' and '1997-06-30'", + "r_filtered": 100 } } ] @@ -1253,15 +1274,17 @@ ANALYZE "loops": 1, "r_loops": 1, "rows": 106, + "r_index_rows": 71, "r_rows": 71, "cost": "REPLACED", "r_table_time_ms": "REPLACED", "r_other_time_ms": "REPLACED", "r_engine_stats": REPLACED, - "r_icp_filtered": 100, "filtered": 100, - "r_filtered": 100, - "index_condition": "orders.o_totalprice between 200000 and 230000" + "r_total_filtered": 100, + "index_condition": "orders.o_totalprice between 200000 and 230000", + "r_icp_filtered": 100, + "r_filtered": 100 } }, { @@ -1287,8 +1310,9 @@ ANALYZE "r_other_time_ms": "REPLACED", "r_engine_stats": REPLACED, "filtered": 8.026644707, - "r_filtered": 7.773109244, - "attached_condition": "lineitem.l_shipDATE between '1997-01-01' and '1997-06-30'" + "r_total_filtered": 7.773109244, + "attached_condition": "lineitem.l_shipDATE between '1997-01-01' and '1997-06-30'", + "r_filtered": 7.773109244 } } ] @@ -1448,16 +1472,18 @@ ANALYZE "loops": 1, "r_loops": 1, "rows": 17, + "r_index_rows": 18, "r_rows": 18, "cost": "REPLACED", "r_table_time_ms": "REPLACED", "r_other_time_ms": "REPLACED", "r_engine_stats": REPLACED, - "r_icp_filtered": 100, "filtered": 0.532889247, - "r_filtered": 38.88888889, + "r_total_filtered": 38.88888889, "index_condition": "lineitem.l_receiptDATE between '1996-10-05' and '1996-10-10'", - "attached_condition": "lineitem.l_shipDATE between '1996-10-01' and '1996-10-10'" + "r_icp_filtered": 100, + "attached_condition": "lineitem.l_shipDATE between '1996-10-01' and '1996-10-10'", + "r_filtered": 38.88888889 } }, { @@ -1478,8 +1504,9 @@ ANALYZE "r_other_time_ms": "REPLACED", "r_engine_stats": REPLACED, "filtered": 8.466666222, - "r_filtered": 14.28571429, - "attached_condition": "orders.o_totalprice between 200000 and 250000" + "r_total_filtered": 14.28571429, + "attached_condition": "orders.o_totalprice between 200000 and 250000", + "r_filtered": 14.28571429 } } ] @@ -1598,16 +1625,18 @@ ANALYZE "loops": 1, "r_loops": 1, "rows": 17, + "r_index_rows": 18, "r_rows": 18, "cost": "REPLACED", "r_table_time_ms": "REPLACED", "r_other_time_ms": "REPLACED", "r_engine_stats": REPLACED, - "r_icp_filtered": 100, "filtered": 0.532889247, - "r_filtered": 38.88888889, + "r_total_filtered": 38.88888889, "index_condition": "lineitem.l_receiptDATE between '1996-10-05' and '1996-10-10'", - "attached_condition": "lineitem.l_shipDATE between '1996-10-01' and '1996-10-10'" + "r_icp_filtered": 100, + "attached_condition": "lineitem.l_shipDATE between '1996-10-01' and '1996-10-10'", + "r_filtered": 38.88888889 } }, { @@ -1628,8 +1657,9 @@ ANALYZE "r_other_time_ms": "REPLACED", "r_engine_stats": REPLACED, "filtered": 8.466666222, - "r_filtered": 14.28571429, - "attached_condition": "orders.o_totalprice between 200000 and 250000" + "r_total_filtered": 14.28571429, + "attached_condition": "orders.o_totalprice between 200000 and 250000", + "r_filtered": 14.28571429 } } ] @@ -1748,16 +1778,18 @@ ANALYZE "loops": 1, "r_loops": 1, "rows": 61, + "r_index_rows": 41, "r_rows": 41, "cost": "REPLACED", "r_table_time_ms": "REPLACED", "r_other_time_ms": "REPLACED", "r_engine_stats": REPLACED, - "r_icp_filtered": 100, "filtered": 5, - "r_filtered": 2.43902439, + "r_total_filtered": 2.43902439, "index_condition": "orders.o_totaldiscount between 18000 and 20000", - "attached_condition": "orders.o_totalprice between 200000 and 220000" + "r_icp_filtered": 100, + "attached_condition": "orders.o_totalprice between 200000 and 220000", + "r_filtered": 2.43902439 } }, { @@ -1783,8 +1815,9 @@ ANALYZE "r_other_time_ms": "REPLACED", "r_engine_stats": REPLACED, "filtered": 2.897585392, - "r_filtered": 66.66666667, - "attached_condition": "lineitem.l_shipDATE between '1996-10-01' and '1996-12-01'" + "r_total_filtered": 66.66666667, + "attached_condition": "lineitem.l_shipDATE between '1996-10-01' and '1996-12-01'", + "r_filtered": 66.66666667 } } ] @@ -1899,16 +1932,18 @@ ANALYZE "loops": 1, "r_loops": 1, "rows": 61, + "r_index_rows": 41, "r_rows": 41, "cost": "REPLACED", "r_table_time_ms": "REPLACED", "r_other_time_ms": "REPLACED", "r_engine_stats": REPLACED, - "r_icp_filtered": 100, "filtered": 5, - "r_filtered": 2.43902439, + "r_total_filtered": 2.43902439, "index_condition": "orders.o_totaldiscount between 18000 and 20000", - "attached_condition": "orders.o_totalprice between 200000 and 220000" + "r_icp_filtered": 100, + "attached_condition": "orders.o_totalprice between 200000 and 220000", + "r_filtered": 2.43902439 } }, { @@ -1934,8 +1969,9 @@ ANALYZE "r_other_time_ms": "REPLACED", "r_engine_stats": REPLACED, "filtered": 2.897585392, - "r_filtered": 66.66666667, - "attached_condition": "lineitem.l_shipDATE between '1996-10-01' and '1996-12-01'" + "r_total_filtered": 66.66666667, + "attached_condition": "lineitem.l_shipDATE between '1996-10-01' and '1996-12-01'", + "r_filtered": 66.66666667 } } ] @@ -2063,16 +2099,18 @@ ANALYZE "loops": 1, "r_loops": 1, "rows": 61, + "r_index_rows": 41, "r_rows": 41, "cost": "REPLACED", "r_table_time_ms": "REPLACED", "r_other_time_ms": "REPLACED", "r_engine_stats": {}, - "r_icp_filtered": 100, "filtered": "REPLACED", - "r_filtered": 2.43902439, + "r_total_filtered": 2.43902439, "index_condition": "orders.o_totaldiscount between 18000 and 20000", - "attached_condition": "orders.o_totalprice between 200000 and 220000 and orders.o_orderDATE between '1992-12-01' and '1997-01-01'" + "r_icp_filtered": 100, + "attached_condition": "orders.o_totalprice between 200000 and 220000 and orders.o_orderDATE between '1992-12-01' and '1997-01-01'", + "r_filtered": 2.43902439 } }, { @@ -2098,8 +2136,9 @@ ANALYZE "r_other_time_ms": "REPLACED", "r_engine_stats": {}, "filtered": "REPLACED", - "r_filtered": 66.66666667, - "attached_condition": "lineitem.l_shipDATE between '1996-10-01' and '1996-12-01'" + "r_total_filtered": 66.66666667, + "attached_condition": "lineitem.l_shipDATE between '1996-10-01' and '1996-12-01'", + "r_filtered": 66.66666667 } } ] @@ -2224,16 +2263,18 @@ ANALYZE "loops": 1, "r_loops": 1, "rows": 61, + "r_index_rows": 41, "r_rows": 41, "cost": "REPLACED", "r_table_time_ms": "REPLACED", "r_other_time_ms": "REPLACED", "r_engine_stats": {}, - "r_icp_filtered": 100, "filtered": "REPLACED", - "r_filtered": 2.43902439, + "r_total_filtered": 2.43902439, "index_condition": "orders.o_totaldiscount between 18000 and 20000", - "attached_condition": "orders.o_totalprice between 200000 and 220000 and orders.o_orderDATE between '1992-12-01' and '1997-01-01'" + "r_icp_filtered": 100, + "attached_condition": "orders.o_totalprice between 200000 and 220000 and orders.o_orderDATE between '1992-12-01' and '1997-01-01'", + "r_filtered": 2.43902439 } }, { @@ -2259,8 +2300,9 @@ ANALYZE "r_other_time_ms": "REPLACED", "r_engine_stats": {}, "filtered": "REPLACED", - "r_filtered": 66.66666667, - "attached_condition": "lineitem.l_shipDATE between '1996-10-01' and '1996-12-01'" + "r_total_filtered": 66.66666667, + "attached_condition": "lineitem.l_shipDATE between '1996-10-01' and '1996-12-01'", + "r_filtered": 66.66666667 } } ] diff --git a/mysql-test/main/rowid_filter_innodb.result b/mysql-test/main/rowid_filter_innodb.result index 31d412c17af68..a02bb933315a5 100644 --- a/mysql-test/main/rowid_filter_innodb.result +++ b/mysql-test/main/rowid_filter_innodb.result @@ -152,16 +152,18 @@ ANALYZE "loops": 1, "r_loops": 1, "rows": 349, + "r_index_rows": 349, "r_rows": 34, "cost": "REPLACED", "r_table_time_ms": "REPLACED", "r_other_time_ms": "REPLACED", "r_engine_stats": REPLACED, - "r_icp_filtered": 100, "filtered": 8.492922783, - "r_filtered": 100, + "r_total_filtered": 9.742120344, "index_condition": "lineitem.l_quantity > 47", - "attached_condition": "lineitem.l_shipDATE between '1997-01-01' and '1997-06-30'" + "r_icp_filtered": 100, + "attached_condition": "lineitem.l_shipDATE between '1997-01-01' and '1997-06-30'", + "r_filtered": 100 } } ] @@ -268,16 +270,18 @@ ANALYZE "loops": 1, "r_loops": 1, "rows": 349, + "r_index_rows": 349, "r_rows": 349, "cost": "REPLACED", "r_table_time_ms": "REPLACED", "r_other_time_ms": "REPLACED", "r_engine_stats": REPLACED, - "r_icp_filtered": 100, "filtered": 8.492922783, - "r_filtered": 9.742120344, + "r_total_filtered": 9.742120344, "index_condition": "lineitem.l_quantity > 47", - "attached_condition": "lineitem.l_shipDATE between '1997-01-01' and '1997-06-30'" + "r_icp_filtered": 100, + "attached_condition": "lineitem.l_shipDATE between '1997-01-01' and '1997-06-30'", + "r_filtered": 9.742120344 } } ] @@ -422,8 +426,9 @@ ANALYZE "r_other_time_ms": "REPLACED", "r_engine_stats": REPLACED, "filtered": 100, - "r_filtered": 100, + "r_total_filtered": 100, "attached_condition": "lineitem.l_shipDATE between '1997-01-01' and '1997-01-31'", + "r_filtered": 100, "using_index": true } }, @@ -446,8 +451,9 @@ ANALYZE "r_other_time_ms": "REPLACED", "r_engine_stats": REPLACED, "filtered": 4.733333111, - "r_filtered": 11.2244898, - "attached_condition": "orders.o_totalprice between 200000 and 230000" + "r_total_filtered": 11.2244898, + "attached_condition": "orders.o_totalprice between 200000 and 230000", + "r_filtered": 11.2244898 } } ] @@ -570,8 +576,9 @@ ANALYZE "r_other_time_ms": "REPLACED", "r_engine_stats": REPLACED, "filtered": 100, - "r_filtered": 100, + "r_total_filtered": 100, "attached_condition": "lineitem.l_shipDATE between '1997-01-01' and '1997-01-31'", + "r_filtered": 100, "using_index": true } }, @@ -594,8 +601,9 @@ ANALYZE "r_other_time_ms": "REPLACED", "r_engine_stats": REPLACED, "filtered": 4.733333111, - "r_filtered": 11.2244898, - "attached_condition": "orders.o_totalprice between 200000 and 230000" + "r_total_filtered": 11.2244898, + "attached_condition": "orders.o_totalprice between 200000 and 230000", + "r_filtered": 11.2244898 } } ] @@ -739,16 +747,18 @@ ANALYZE "loops": 1, "r_loops": 1, "rows": 349, + "r_index_rows": 349, "r_rows": 34, "cost": "REPLACED", "r_table_time_ms": "REPLACED", "r_other_time_ms": "REPLACED", "r_engine_stats": REPLACED, - "r_icp_filtered": 100, "filtered": 8.492922783, - "r_filtered": 100, + "r_total_filtered": 9.742120344, "index_condition": "lineitem.l_quantity > 47", - "attached_condition": "lineitem.l_shipDATE between '1997-01-01' and '1997-06-30'" + "r_icp_filtered": 100, + "attached_condition": "lineitem.l_shipDATE between '1997-01-01' and '1997-06-30'", + "r_filtered": 100 } }, { @@ -769,8 +779,9 @@ ANALYZE "r_other_time_ms": "REPLACED", "r_engine_stats": REPLACED, "filtered": 9.600000381, - "r_filtered": 26.47058824, - "attached_condition": "orders.o_totalprice between 180000 and 230000" + "r_total_filtered": 26.47058824, + "attached_condition": "orders.o_totalprice between 180000 and 230000", + "r_filtered": 26.47058824 } } ] @@ -892,8 +903,9 @@ ANALYZE "r_other_time_ms": "REPLACED", "r_engine_stats": REPLACED, "filtered": 100, - "r_filtered": 100, + "r_total_filtered": 100, "attached_condition": "orders.o_totalprice between 180000 and 230000", + "r_filtered": 100, "using_index": true } }, @@ -921,8 +933,9 @@ ANALYZE "r_other_time_ms": "REPLACED", "r_engine_stats": REPLACED, "filtered": 0.493593663, - "r_filtered": 0.943396226, - "attached_condition": "lineitem.l_shipDATE between '1997-01-01' and '1997-06-30' and lineitem.l_quantity > 47" + "r_total_filtered": 0.943396226, + "attached_condition": "lineitem.l_shipDATE between '1997-01-01' and '1997-06-30' and lineitem.l_quantity > 47", + "r_filtered": 0.943396226 } } ] @@ -1047,8 +1060,9 @@ ANALYZE "r_other_time_ms": "REPLACED", "r_engine_stats": REPLACED, "filtered": 100, - "r_filtered": 100, + "r_total_filtered": 100, "attached_condition": "orders.o_totalprice between 200000 and 230000", + "r_filtered": 100, "using_index": true } }, @@ -1075,8 +1089,9 @@ ANALYZE "r_other_time_ms": "REPLACED", "r_engine_stats": REPLACED, "filtered": 8.492922783, - "r_filtered": 7.773109244, - "attached_condition": "lineitem.l_shipDATE between '1997-01-01' and '1997-06-30'" + "r_total_filtered": 7.773109244, + "attached_condition": "lineitem.l_shipDATE between '1997-01-01' and '1997-06-30'", + "r_filtered": 7.773109244 } } ] @@ -1220,8 +1235,9 @@ ANALYZE "r_other_time_ms": "REPLACED", "r_engine_stats": REPLACED, "filtered": 100, - "r_filtered": 100, + "r_total_filtered": 100, "attached_condition": "orders.o_totalprice between 200000 and 230000", + "r_filtered": 100, "using_index": true } }, @@ -1248,8 +1264,9 @@ ANALYZE "r_other_time_ms": "REPLACED", "r_engine_stats": REPLACED, "filtered": 8.492922783, - "r_filtered": 7.773109244, - "attached_condition": "lineitem.l_shipDATE between '1997-01-01' and '1997-06-30'" + "r_total_filtered": 7.773109244, + "attached_condition": "lineitem.l_shipDATE between '1997-01-01' and '1997-06-30'", + "r_filtered": 7.773109244 } } ] @@ -1409,16 +1426,18 @@ ANALYZE "loops": 1, "r_loops": 1, "rows": 18, + "r_index_rows": 18, "r_rows": 18, "cost": "REPLACED", "r_table_time_ms": "REPLACED", "r_other_time_ms": "REPLACED", "r_engine_stats": REPLACED, - "r_icp_filtered": 100, "filtered": 0.566194832, - "r_filtered": 38.88888889, + "r_total_filtered": 38.88888889, "index_condition": "lineitem.l_receiptDATE between '1996-10-05' and '1996-10-10'", - "attached_condition": "lineitem.l_shipDATE between '1996-10-01' and '1996-10-10'" + "r_icp_filtered": 100, + "attached_condition": "lineitem.l_shipDATE between '1996-10-01' and '1996-10-10'", + "r_filtered": 38.88888889 } }, { @@ -1439,8 +1458,9 @@ ANALYZE "r_other_time_ms": "REPLACED", "r_engine_stats": REPLACED, "filtered": 5.666666508, - "r_filtered": 14.28571429, - "attached_condition": "orders.o_totalprice between 200000 and 250000" + "r_total_filtered": 14.28571429, + "attached_condition": "orders.o_totalprice between 200000 and 250000", + "r_filtered": 14.28571429 } } ] @@ -1559,16 +1579,18 @@ ANALYZE "loops": 1, "r_loops": 1, "rows": 18, + "r_index_rows": 18, "r_rows": 18, "cost": "REPLACED", "r_table_time_ms": "REPLACED", "r_other_time_ms": "REPLACED", "r_engine_stats": REPLACED, - "r_icp_filtered": 100, "filtered": 0.566194832, - "r_filtered": 38.88888889, + "r_total_filtered": 38.88888889, "index_condition": "lineitem.l_receiptDATE between '1996-10-05' and '1996-10-10'", - "attached_condition": "lineitem.l_shipDATE between '1996-10-01' and '1996-10-10'" + "r_icp_filtered": 100, + "attached_condition": "lineitem.l_shipDATE between '1996-10-01' and '1996-10-10'", + "r_filtered": 38.88888889 } }, { @@ -1589,8 +1611,9 @@ ANALYZE "r_other_time_ms": "REPLACED", "r_engine_stats": REPLACED, "filtered": 5.666666508, - "r_filtered": 14.28571429, - "attached_condition": "orders.o_totalprice between 200000 and 250000" + "r_total_filtered": 14.28571429, + "attached_condition": "orders.o_totalprice between 200000 and 250000", + "r_filtered": 14.28571429 } } ] @@ -1709,16 +1732,18 @@ ANALYZE "loops": 1, "r_loops": 1, "rows": 41, + "r_index_rows": 41, "r_rows": 41, "cost": "REPLACED", "r_table_time_ms": "REPLACED", "r_other_time_ms": "REPLACED", "r_engine_stats": REPLACED, - "r_icp_filtered": 100, "filtered": 3.333333254, - "r_filtered": 2.43902439, + "r_total_filtered": 2.43902439, "index_condition": "orders.o_totaldiscount between 18000 and 20000", - "attached_condition": "orders.o_totalprice between 200000 and 220000" + "r_icp_filtered": 100, + "attached_condition": "orders.o_totalprice between 200000 and 220000", + "r_filtered": 2.43902439 } }, { @@ -1744,8 +1769,9 @@ ANALYZE "r_other_time_ms": "REPLACED", "r_engine_stats": REPLACED, "filtered": 3.047460556, - "r_filtered": 66.66666667, - "attached_condition": "lineitem.l_shipDATE between '1996-10-01' and '1996-12-01'" + "r_total_filtered": 66.66666667, + "attached_condition": "lineitem.l_shipDATE between '1996-10-01' and '1996-12-01'", + "r_filtered": 66.66666667 } } ] @@ -1860,16 +1886,18 @@ ANALYZE "loops": 1, "r_loops": 1, "rows": 41, + "r_index_rows": 41, "r_rows": 41, "cost": "REPLACED", "r_table_time_ms": "REPLACED", "r_other_time_ms": "REPLACED", "r_engine_stats": REPLACED, - "r_icp_filtered": 100, "filtered": 3.333333254, - "r_filtered": 2.43902439, + "r_total_filtered": 2.43902439, "index_condition": "orders.o_totaldiscount between 18000 and 20000", - "attached_condition": "orders.o_totalprice between 200000 and 220000" + "r_icp_filtered": 100, + "attached_condition": "orders.o_totalprice between 200000 and 220000", + "r_filtered": 2.43902439 } }, { @@ -1895,8 +1923,9 @@ ANALYZE "r_other_time_ms": "REPLACED", "r_engine_stats": REPLACED, "filtered": 3.047460556, - "r_filtered": 66.66666667, - "attached_condition": "lineitem.l_shipDATE between '1996-10-01' and '1996-12-01'" + "r_total_filtered": 66.66666667, + "attached_condition": "lineitem.l_shipDATE between '1996-10-01' and '1996-12-01'", + "r_filtered": 66.66666667 } } ] @@ -2024,6 +2053,7 @@ ANALYZE "loops": 1, "r_loops": 1, "rows": 41, + "r_index_rows": 41, "r_rows": 41, "cost": "REPLACED", "r_table_time_ms": "REPLACED", @@ -2031,11 +2061,12 @@ ANALYZE "r_engine_stats": { "pages_accessed": 84 }, - "r_icp_filtered": 100, "filtered": "REPLACED", - "r_filtered": 2.43902439, + "r_total_filtered": 2.43902439, "index_condition": "orders.o_totaldiscount between 18000 and 20000", - "attached_condition": "orders.o_totalprice between 200000 and 220000 and orders.o_orderDATE between '1992-12-01' and '1997-01-01'" + "r_icp_filtered": 100, + "attached_condition": "orders.o_totalprice between 200000 and 220000 and orders.o_orderDATE between '1992-12-01' and '1997-01-01'", + "r_filtered": 2.43902439 } }, { @@ -2063,8 +2094,9 @@ ANALYZE "pages_accessed": 3 }, "filtered": "REPLACED", - "r_filtered": 66.66666667, - "attached_condition": "lineitem.l_shipDATE between '1996-10-01' and '1996-12-01'" + "r_total_filtered": 66.66666667, + "attached_condition": "lineitem.l_shipDATE between '1996-10-01' and '1996-12-01'", + "r_filtered": 66.66666667 } } ] @@ -2189,6 +2221,7 @@ ANALYZE "loops": 1, "r_loops": 1, "rows": 41, + "r_index_rows": 41, "r_rows": 41, "cost": "REPLACED", "r_table_time_ms": "REPLACED", @@ -2196,11 +2229,12 @@ ANALYZE "r_engine_stats": { "pages_accessed": 84 }, - "r_icp_filtered": 100, "filtered": "REPLACED", - "r_filtered": 2.43902439, + "r_total_filtered": 2.43902439, "index_condition": "orders.o_totaldiscount between 18000 and 20000", - "attached_condition": "orders.o_totalprice between 200000 and 220000 and orders.o_orderDATE between '1992-12-01' and '1997-01-01'" + "r_icp_filtered": 100, + "attached_condition": "orders.o_totalprice between 200000 and 220000 and orders.o_orderDATE between '1992-12-01' and '1997-01-01'", + "r_filtered": 2.43902439 } }, { @@ -2228,8 +2262,9 @@ ANALYZE "pages_accessed": 3 }, "filtered": "REPLACED", - "r_filtered": 66.66666667, - "attached_condition": "lineitem.l_shipDATE between '1996-10-01' and '1996-12-01'" + "r_total_filtered": 66.66666667, + "attached_condition": "lineitem.l_shipDATE between '1996-10-01' and '1996-12-01'", + "r_filtered": 66.66666667 } } ] @@ -3385,8 +3420,9 @@ ANALYZE "r_other_time_ms": "REPLACED", "r_engine_stats": REPLACED, "filtered": 100, - "r_filtered": 100, + "r_total_filtered": 100, "attached_condition": "t.tp = 121 and t.rid = 'B5FCC8C7111E4E3CBC21AAF5012F59C2'", + "r_filtered": 100, "using_index": true } }, @@ -3409,6 +3445,7 @@ ANALYZE "r_other_time_ms": "REPLACED", "r_engine_stats": REPLACED, "filtered": 100, + "r_total_filtered": 100, "r_filtered": 100 }, "buffer_type": "flat", @@ -3449,12 +3486,14 @@ ANALYZE "loops": 3.5384, "r_loops": 1, "rows": 24, + "r_index_rows": 80, "r_rows": 32, "cost": "REPLACED", "r_table_time_ms": "REPLACED", "r_other_time_ms": "REPLACED", "r_engine_stats": REPLACED, "filtered": 14.46428585, + "r_total_filtered": 40, "r_filtered": 100 }, "buffer_type": "incremental", diff --git a/mysql-test/main/rowid_filter_myisam.result b/mysql-test/main/rowid_filter_myisam.result index a9dac9368d092..45f1cb05444c9 100644 --- a/mysql-test/main/rowid_filter_myisam.result +++ b/mysql-test/main/rowid_filter_myisam.result @@ -354,16 +354,18 @@ ANALYZE "loops": 1, "r_loops": 1, "rows": 1, + "r_index_rows": 1, "r_rows": 1, "cost": "REPLACED", "r_table_time_ms": "REPLACED", "r_other_time_ms": "REPLACED", "r_engine_stats": REPLACED, - "r_icp_filtered": 100, "filtered": 49.20000076, - "r_filtered": 100, + "r_total_filtered": 100, "index_condition": "t1.nm like '500%'", - "attached_condition": "t1.fl2 = 0" + "r_icp_filtered": 100, + "attached_condition": "t1.fl2 = 0", + "r_filtered": 100 } } ] @@ -412,16 +414,18 @@ ANALYZE "loops": 1, "r_loops": 1, "rows": 1, + "r_index_rows": 1, "r_rows": 1, "cost": "REPLACED", "r_table_time_ms": "REPLACED", "r_other_time_ms": "REPLACED", "r_engine_stats": REPLACED, - "r_icp_filtered": 100, "filtered": 49.20000076, - "r_filtered": 100, + "r_total_filtered": 100, "index_condition": "t1.nm like '500%'", - "attached_condition": "t1.fl2 = 0" + "r_icp_filtered": 100, + "attached_condition": "t1.fl2 = 0", + "r_filtered": 100 } } ] @@ -509,14 +513,16 @@ ANALYZE "loops": 1, "r_loops": 1, "rows": 55, + "r_index_rows": 100, "r_rows": 2, "cost": "REPLACED", "r_table_time_ms": "REPLACED", "r_other_time_ms": "REPLACED", "r_engine_stats": REPLACED, "filtered": 1.149999976, - "r_filtered": 100, - "attached_condition": "t1.nm like '75%'" + "r_total_filtered": 2, + "attached_condition": "t1.nm like '75%'", + "r_filtered": 100 } } ] @@ -613,16 +619,18 @@ ANALYZE "loops": 1, "r_loops": 1, "rows": 44, + "r_index_rows": 44, "r_rows": 44, "cost": "REPLACED", "r_table_time_ms": "REPLACED", "r_other_time_ms": "REPLACED", "r_engine_stats": REPLACED, - "r_icp_filtered": 100, "filtered": 8.630000114, - "r_filtered": 0, + "r_total_filtered": 0, "index_condition": "t1.nm like '3400%' or t1.nm like '3402%' or t1.nm like '3403%' or t1.nm like '3404%' or t1.nm like '3405%' or t1.nm like '3406%' or t1.nm like '3407%' or t1.nm like '3409%' or t1.nm like '3411%' or t1.nm like '3412%' or t1.nm like '3413%' or t1.nm like '3414%' or t1.nm like '3415%' or t1.nm like '3416%' or t1.nm like '3417%' or t1.nm like '3418%' or t1.nm like '3419%' or t1.nm like '3421%' or t1.nm like '3422%' or t1.nm like '3423%' or t1.nm like '3424%' or t1.nm like '3425%' or t1.nm like '3426%' or t1.nm like '3427%' or t1.nm like '3428%' or t1.nm like '3429%' or t1.nm like '3430%' or t1.nm like '3431%' or t1.nm like '3432%' or t1.nm like '3433%' or t1.nm like '3434%' or t1.nm like '3435%' or t1.nm like '3436%' or t1.nm like '3437%' or t1.nm like '3439%' or t1.nm like '3440%' or t1.nm like '3441%' or t1.nm like '3442%' or t1.nm like '3443%' or t1.nm like '3444%' or t1.nm like '3445%' or t1.nm like '3446%' or t1.nm like '3447%' or t1.nm like '3448%'", - "attached_condition": "t1.fl2 = 0" + "r_icp_filtered": 100, + "attached_condition": "t1.fl2 = 0", + "r_filtered": 0 } } ] @@ -671,16 +679,18 @@ ANALYZE "loops": 1, "r_loops": 1, "rows": 44, + "r_index_rows": 0, "r_rows": 0, "cost": "REPLACED", "r_table_time_ms": "REPLACED", "r_other_time_ms": "REPLACED", "r_engine_stats": REPLACED, - "r_icp_filtered": 100, "filtered": 8.529999733, - "r_filtered": 100, + "r_total_filtered": 100, "index_condition": "t1.nm like '3400%' or t1.nm like '3402%' or t1.nm like '3403%' or t1.nm like '3404%' or t1.nm like '3405%' or t1.nm like '3406%' or t1.nm like '3407%' or t1.nm like '3409%' or t1.nm like '3411%' or t1.nm like '3412%' or t1.nm like '3413%' or t1.nm like '3414%' or t1.nm like '3415%' or t1.nm like '3416%' or t1.nm like '3417%' or t1.nm like '3418%' or t1.nm like '3419%' or t1.nm like '3421%' or t1.nm like '3422%' or t1.nm like '3423%' or t1.nm like '3424%' or t1.nm like '3425%' or t1.nm like '3426%' or t1.nm like '3427%' or t1.nm like '3428%' or t1.nm like '3429%' or t1.nm like '3430%' or t1.nm like '3431%' or t1.nm like '3432%' or t1.nm like '3433%' or t1.nm like '3434%' or t1.nm like '3435%' or t1.nm like '3436%' or t1.nm like '3437%' or t1.nm like '3439%' or t1.nm like '3440%' or t1.nm like '3441%' or t1.nm like '3442%' or t1.nm like '3443%' or t1.nm like '3444%' or t1.nm like '3445%' or t1.nm like '3446%' or t1.nm like '3447%' or t1.nm like '3448%'", - "attached_condition": "t1.fl2 = 0" + "r_icp_filtered": 100, + "attached_condition": "t1.fl2 = 0", + "r_filtered": 100 } } ] diff --git a/mysql-test/main/show_analyze.result b/mysql-test/main/show_analyze.result index 6f4159804f4f1..087f63b3db174 100644 --- a/mysql-test/main/show_analyze.result +++ b/mysql-test/main/show_analyze.result @@ -431,6 +431,7 @@ ANALYZE "r_other_time_ms": "REPLACED", "r_engine_stats": REPLACED, "filtered": 100, + "r_total_filtered": 100, "r_filtered": 100 } } diff --git a/mysql-test/main/show_analyze_json.result b/mysql-test/main/show_analyze_json.result index 66b94a6b38319..f44638c137233 100644 --- a/mysql-test/main/show_analyze_json.result +++ b/mysql-test/main/show_analyze_json.result @@ -57,8 +57,9 @@ SHOW ANALYZE "r_rows": 1000, "cost": "REPLACED", "filtered": 50, - "r_filtered": 50, - "attached_condition": "t1.c < 500" + "r_total_filtered": 50, + "attached_condition": "t1.c < 500", + "r_filtered": 50 } } ] @@ -93,8 +94,9 @@ SHOW ANALYZE "r_rows": 1000, "cost": "REPLACED", "filtered": 10, - "r_filtered": 10, - "attached_condition": "t1.c < 10" + "r_total_filtered": 10, + "attached_condition": "t1.c < 10", + "r_filtered": 10 } } ] @@ -135,8 +137,9 @@ SHOW ANALYZE "r_other_time_ms": "REPLACED", "r_engine_stats": REPLACED, "filtered": 99.90000153, - "r_filtered": 100, - "attached_condition": "t1.a < 10" + "r_total_filtered": 100, + "attached_condition": "t1.a < 10", + "r_filtered": 100 } } ] @@ -183,8 +186,9 @@ SHOW ANALYZE "r_rows": 10, "cost": "REPLACED", "filtered": 100, - "r_filtered": 60, - "attached_condition": "a.a <= 5" + "r_total_filtered": 60, + "attached_condition": "a.a <= 5", + "r_filtered": 60 } } ] @@ -206,8 +210,9 @@ SHOW ANALYZE "r_rows": null, "cost": "REPLACED", "filtered": 100, - "r_filtered": null, - "attached_condition": "b.a >= 9" + "r_total_filtered": null, + "attached_condition": "b.a >= 9", + "r_filtered": null } } ] @@ -258,8 +263,9 @@ SHOW ANALYZE "r_rows": 10, "cost": "REPLACED", "filtered": 100, - "r_filtered": 60, - "attached_condition": "a.a <= 5" + "r_total_filtered": 60, + "attached_condition": "a.a <= 5", + "r_filtered": 60 } } ] @@ -282,8 +288,9 @@ SHOW ANALYZE "r_rows": 10, "cost": "REPLACED", "filtered": 100, - "r_filtered": 10, - "attached_condition": "b.a >= 9" + "r_total_filtered": 10, + "attached_condition": "b.a >= 9", + "r_filtered": 10 } } ] @@ -338,8 +345,9 @@ SHOW ANALYZE "r_other_time_ms": "REPLACED", "r_engine_stats": REPLACED, "filtered": 100, - "r_filtered": 60, - "attached_condition": "a.a <= 5" + "r_total_filtered": 60, + "attached_condition": "a.a <= 5", + "r_filtered": 60 } } ] @@ -362,8 +370,9 @@ SHOW ANALYZE "cost": "REPLACED", "r_engine_stats": REPLACED, "filtered": 100, - "r_filtered": null, - "attached_condition": "b.a >= 9" + "r_total_filtered": null, + "attached_condition": "b.a >= 9", + "r_filtered": null } } ] @@ -418,8 +427,9 @@ SHOW ANALYZE "r_other_time_ms": "REPLACED", "r_engine_stats": REPLACED, "filtered": 100, - "r_filtered": 60, - "attached_condition": "a.a <= 5" + "r_total_filtered": 60, + "attached_condition": "a.a <= 5", + "r_filtered": 60 } } ] @@ -446,8 +456,9 @@ SHOW ANALYZE "r_other_time_ms": "REPLACED", "r_engine_stats": REPLACED, "filtered": 100, - "r_filtered": 10, - "attached_condition": "b.a >= 9" + "r_total_filtered": 10, + "attached_condition": "b.a >= 9", + "r_filtered": 10 } } ] @@ -492,8 +503,9 @@ SHOW ANALYZE "r_rows": 10, "cost": "REPLACED", "filtered": 100, - "r_filtered": 20, - "attached_condition": "a.a < 2" + "r_total_filtered": 20, + "attached_condition": "a.a < 2", + "r_filtered": 20 } } ], @@ -514,8 +526,9 @@ SHOW ANALYZE "r_rows": 10, "cost": "REPLACED", "filtered": 100, - "r_filtered": 30, - "attached_condition": "b.a > 6" + "r_total_filtered": 30, + "attached_condition": "b.a > 6", + "r_filtered": 30 } } ] @@ -562,8 +575,9 @@ SHOW ANALYZE "r_other_time_ms": "REPLACED", "r_engine_stats": REPLACED, "filtered": 100, - "r_filtered": 20, - "attached_condition": "a.a < 2" + "r_total_filtered": 20, + "attached_condition": "a.a < 2", + "r_filtered": 20 } } ], @@ -588,8 +602,9 @@ SHOW ANALYZE "r_other_time_ms": "REPLACED", "r_engine_stats": REPLACED, "filtered": 100, - "r_filtered": 30, - "attached_condition": "b.a > 6" + "r_total_filtered": 30, + "attached_condition": "b.a > 6", + "r_filtered": 30 } } ] @@ -631,8 +646,9 @@ SHOW ANALYZE "r_rows": null, "cost": "REPLACED", "filtered": 100, - "r_filtered": null, - "attached_condition": "a.a < 2" + "r_total_filtered": null, + "attached_condition": "a.a < 2", + "r_filtered": null } } ], @@ -655,8 +671,9 @@ SHOW ANALYZE "r_rows": null, "cost": "REPLACED", "filtered": 100, - "r_filtered": null, - "attached_condition": "b.a + a.a < 10" + "r_total_filtered": null, + "attached_condition": "b.a + a.a < 10", + "r_filtered": null } } ] @@ -700,8 +717,9 @@ SHOW ANALYZE "r_rows": 10, "cost": "REPLACED", "filtered": 100, - "r_filtered": 20, - "attached_condition": "a.a < 2" + "r_total_filtered": 20, + "attached_condition": "a.a < 2", + "r_filtered": 20 } } ], @@ -725,8 +743,9 @@ SHOW ANALYZE "r_rows": 10, "cost": "REPLACED", "filtered": 100, - "r_filtered": 95, - "attached_condition": "b.a + a.a < 10" + "r_total_filtered": 95, + "attached_condition": "b.a + a.a < 10", + "r_filtered": 95 } } ] @@ -774,8 +793,9 @@ SHOW ANALYZE "r_other_time_ms": "REPLACED", "r_engine_stats": REPLACED, "filtered": 100, - "r_filtered": 20, - "attached_condition": "a.a < 2" + "r_total_filtered": 20, + "attached_condition": "a.a < 2", + "r_filtered": 20 } } ], @@ -803,8 +823,9 @@ SHOW ANALYZE "r_other_time_ms": "REPLACED", "r_engine_stats": REPLACED, "filtered": 100, - "r_filtered": 95, - "attached_condition": "b.a + a.a < 10" + "r_total_filtered": 95, + "attached_condition": "b.a + a.a < 10", + "r_filtered": 95 } } ] @@ -856,8 +877,9 @@ SHOW ANALYZE "access_type": "ALL", "rows": 2, "r_rows": 1, - "r_filtered": 0, - "attached_condition": "(subquery#2) > 3" + "r_total_filtered": 0, + "attached_condition": "(subquery#2) > 3", + "r_filtered": 0 }, "subqueries": [ { @@ -875,8 +897,9 @@ SHOW ANALYZE "r_rows": null, "cost": "REPLACED", "filtered": 100, - "r_filtered": null, - "attached_condition": "t2.a + t0.a < 3" + "r_total_filtered": null, + "attached_condition": "t2.a + t0.a < 3", + "r_filtered": null } } ] @@ -902,8 +925,9 @@ SHOW ANALYZE "access_type": "ALL", "rows": 2, "r_rows": 2, - "r_filtered": 0, - "attached_condition": "(subquery#2) > 3" + "r_total_filtered": 0, + "attached_condition": "(subquery#2) > 3", + "r_filtered": 0 }, "subqueries": [ { @@ -922,8 +946,9 @@ SHOW ANALYZE "r_rows": 10, "cost": "REPLACED", "filtered": 100, - "r_filtered": 30, - "attached_condition": "t2.a + t0.a < 3" + "r_total_filtered": 30, + "attached_condition": "t2.a + t0.a < 3", + "r_filtered": 30 } } ] @@ -960,8 +985,9 @@ SHOW ANALYZE "access_type": "ALL", "rows": 2, "r_rows": 1, - "r_filtered": 0, - "attached_condition": "(subquery#2) > 3" + "r_total_filtered": 0, + "attached_condition": "(subquery#2) > 3", + "r_filtered": 0 }, "subqueries": [ { @@ -979,8 +1005,9 @@ SHOW ANALYZE "r_rows": null, "cost": "REPLACED", "filtered": 100, - "r_filtered": null, - "attached_condition": "t2.a + t0.a < 3" + "r_total_filtered": null, + "attached_condition": "t2.a + t0.a < 3", + "r_filtered": null } } ] @@ -1006,8 +1033,9 @@ SHOW ANALYZE "access_type": "ALL", "rows": 2, "r_rows": 2, - "r_filtered": 0, - "attached_condition": "(subquery#2) > 3" + "r_total_filtered": 0, + "attached_condition": "(subquery#2) > 3", + "r_filtered": 0 }, "subqueries": [ { @@ -1026,8 +1054,9 @@ SHOW ANALYZE "r_rows": 10, "cost": "REPLACED", "filtered": 100, - "r_filtered": 30, - "attached_condition": "t2.a + t0.a < 3" + "r_total_filtered": 30, + "attached_condition": "t2.a + t0.a < 3", + "r_filtered": 30 } } ] @@ -1071,6 +1100,7 @@ SHOW ANALYZE "r_rows": 1, "cost": "REPLACED", "filtered": 100, + "r_total_filtered": 100, "r_filtered": 100 } } @@ -1094,8 +1124,9 @@ SHOW ANALYZE "r_rows": null, "cost": "REPLACED", "filtered": 100, - "r_filtered": null, - "attached_condition": "t2.a + t0.a < 3" + "r_total_filtered": null, + "attached_condition": "t2.a + t0.a < 3", + "r_filtered": null } } ] @@ -1129,6 +1160,7 @@ SHOW ANALYZE "r_rows": 2, "cost": "REPLACED", "filtered": 100, + "r_total_filtered": 100, "r_filtered": 100 } } @@ -1153,8 +1185,9 @@ SHOW ANALYZE "r_rows": 10, "cost": "REPLACED", "filtered": 100, - "r_filtered": 30, - "attached_condition": "t2.a + t0.a < 3" + "r_total_filtered": 30, + "attached_condition": "t2.a + t0.a < 3", + "r_filtered": 30 } } ] @@ -1188,6 +1221,7 @@ SHOW ANALYZE "r_rows": 3, "cost": "REPLACED", "filtered": 100, + "r_total_filtered": 100, "r_filtered": 100 } } @@ -1212,8 +1246,9 @@ SHOW ANALYZE "r_rows": 10, "cost": "REPLACED", "filtered": 100, - "r_filtered": 25, - "attached_condition": "t2.a + t0.a < 3" + "r_total_filtered": 25, + "attached_condition": "t2.a + t0.a < 3", + "r_filtered": 25 } } ] @@ -1270,6 +1305,7 @@ SHOW ANALYZE "r_rows": 10, "cost": "REPLACED", "filtered": 100, + "r_total_filtered": 100, "r_filtered": 100 } } @@ -1324,6 +1360,7 @@ SHOW ANALYZE "r_rows": 10, "cost": "REPLACED", "filtered": 100, + "r_total_filtered": 100, "r_filtered": 100 } } @@ -1376,6 +1413,7 @@ SHOW ANALYZE "r_rows": 10, "cost": "REPLACED", "filtered": 100, + "r_total_filtered": 100, "r_filtered": 100 } } diff --git a/mysql-test/main/subselect4.result b/mysql-test/main/subselect4.result index a08d4f72e9954..b0105ad1ff10e 100644 --- a/mysql-test/main/subselect4.result +++ b/mysql-test/main/subselect4.result @@ -2905,6 +2905,7 @@ ANALYZE "r_other_time_ms": "REPLACED", "r_engine_stats": REPLACED, "filtered": 100, + "r_total_filtered": 100, "r_filtered": 100 } } @@ -2933,8 +2934,9 @@ ANALYZE "r_other_time_ms": "REPLACED", "r_engine_stats": REPLACED, "filtered": 100, - "r_filtered": 50, - "attached_condition": "((t1.b,(subquery#3) >= 4))" + "r_total_filtered": 50, + "attached_condition": "((t1.b,(subquery#3) >= 4))", + "r_filtered": 50 } } ], @@ -2959,6 +2961,7 @@ ANALYZE "r_other_time_ms": "REPLACED", "r_engine_stats": REPLACED, "filtered": 100, + "r_total_filtered": 100, "r_filtered": 100 } } diff --git a/mysql-test/main/subselect_cache.result b/mysql-test/main/subselect_cache.result index 97c4ef04a11a2..727e60e4b7ddf 100644 --- a/mysql-test/main/subselect_cache.result +++ b/mysql-test/main/subselect_cache.result @@ -66,6 +66,7 @@ ANALYZE "r_other_time_ms": "REPLACED", "r_engine_stats": REPLACED, "filtered": 100, + "r_total_filtered": 100, "r_filtered": 100 } } @@ -94,8 +95,9 @@ ANALYZE "r_other_time_ms": "REPLACED", "r_engine_stats": REPLACED, "filtered": 100, - "r_filtered": 18.75, - "attached_condition": "t1.b = t2.c" + "r_total_filtered": 18.75, + "attached_condition": "t1.b = t2.c", + "r_filtered": 18.75 } } ] @@ -131,6 +133,7 @@ ANALYZE "r_other_time_ms": "REPLACED", "r_engine_stats": REPLACED, "filtered": 100, + "r_total_filtered": 100, "r_filtered": 100 } } @@ -167,8 +170,9 @@ ANALYZE "r_other_time_ms": "REPLACED", "r_engine_stats": REPLACED, "filtered": 100, - "r_filtered": 18.75, - "attached_condition": "t1.b = t2.c" + "r_total_filtered": 18.75, + "attached_condition": "t1.b = t2.c", + "r_filtered": 18.75 } } ] @@ -211,8 +215,9 @@ ANALYZE "r_other_time_ms": "REPLACED", "r_engine_stats": REPLACED, "filtered": 100, - "r_filtered": 18.75, - "attached_condition": "t1.b = t2.c" + "r_total_filtered": 18.75, + "attached_condition": "t1.b = t2.c", + "r_filtered": 18.75 } } ] diff --git a/mysql-test/main/win.result b/mysql-test/main/win.result index 93652834a806d..a0d416d23043d 100644 --- a/mysql-test/main/win.result +++ b/mysql-test/main/win.result @@ -3895,6 +3895,7 @@ ANALYZE "r_other_time_ms": "REPLACED", "r_engine_stats": REPLACED, "filtered": 100, + "r_total_filtered": 100, "r_filtered": 100 } } diff --git a/mysql-test/suite/encryption/r/tempfiles_encrypted.result b/mysql-test/suite/encryption/r/tempfiles_encrypted.result index 3560672e5095d..9885e6cac18c7 100644 --- a/mysql-test/suite/encryption/r/tempfiles_encrypted.result +++ b/mysql-test/suite/encryption/r/tempfiles_encrypted.result @@ -3901,6 +3901,7 @@ ANALYZE "r_other_time_ms": "REPLACED", "r_engine_stats": REPLACED, "filtered": 100, + "r_total_filtered": 100, "r_filtered": 100 } } diff --git a/mysql-test/suite/federated/federatedx_create_handlers.result b/mysql-test/suite/federated/federatedx_create_handlers.result index 231862f76ad26..b09e264dd6e8c 100644 --- a/mysql-test/suite/federated/federatedx_create_handlers.result +++ b/mysql-test/suite/federated/federatedx_create_handlers.result @@ -253,6 +253,7 @@ ANALYZE "r_other_time_ms": "REPLACED", "r_engine_stats": REPLACED, "filtered": 100, + "r_total_filtered": 100, "r_filtered": 100 } }, @@ -273,6 +274,7 @@ ANALYZE "r_table_time_ms": "REPLACED", "r_other_time_ms": "REPLACED", "filtered": 100, + "r_total_filtered": 100, "r_filtered": 100, "materialized": { "query_block": { diff --git a/sql/sql_analyze_stmt.h b/sql/sql_analyze_stmt.h index 5f75960c4ac4f..f6e4478d949ef 100644 --- a/sql/sql_analyze_stmt.h +++ b/sql/sql_analyze_stmt.h @@ -236,6 +236,12 @@ class Table_access_tracker ? static_cast(r_rows) / static_cast(r_scans) : 0; } + double get_avg_rows_after_where() const + { + return r_scans + ? static_cast(r_rows_after_where) / static_cast(r_scans) + : 0; + } double get_filtered_after_where() const { diff --git a/sql/sql_explain.cc b/sql/sql_explain.cc index 36d7e7d315b7c..48fe7ab01c2c7 100644 --- a/sql/sql_explain.cc +++ b/sql/sql_explain.cc @@ -1804,28 +1804,9 @@ void Explain_table_access::tag_to_json(Json_writer *writer, writer->add_member("open_frm_only").add_bool(true); break; case ET_USING_INDEX_CONDITION: - writer->add_member("index_condition"); - write_item(writer, pushed_index_cond); - break; case ET_USING_INDEX_CONDITION_BKA: - writer->add_member("index_condition_bka"); - write_item(writer, pushed_index_cond); - break; case ET_USING_WHERE: - { - /* - We are printing the condition that is checked when scanning this - table. - - when join buffer is used, it is cache_cond. - - in other cases, it is where_cond. - */ - Item *item= bka_type.is_using_jbuf()? cache_cond: where_cond; - if (item) - { - writer->add_member("attached_condition"); - write_item(writer, item); - } - } + /* Conditions are printed outside of this function */ break; case ET_USING_INDEX: writer->add_member("using_index").add_bool(true); @@ -2089,9 +2070,47 @@ void Explain_table_access::print_explain_json(Explain_query *query, if (rows_set) writer->add_member("rows").add_ull(rows); - /* `r_rows` */ + double r_index_rows; /* protected by have_icp_or_rowid_filter */ + bool r_index_rows_is_zero; /* also protected by have_icp_or_rowid_filter */ + bool have_icp_or_rowid_filter= false; + /* `r_index_rows` and `r_rows` */ if (is_analyze) { + /* + r_index_rows is the number of rows enumerated in the index before + any kind of checking. The number is the average across all scans. + */ + double loops; + if (tracker.get_loops()) + loops = rows2double(tracker.get_loops()); + else + loops= 1.0; + handler *file= handler_for_stats; + + if (file && file->handler_stats && file->pushed_idx_cond) + { + /* + Pushed Index Condition is checked before checking the Rowid Filter, + so try getting it first. + */ + ulonglong val= file->handler_stats->icp_attempts; + r_index_rows_is_zero= (val == 0); + r_index_rows= val / loops; + have_icp_or_rowid_filter= true; + } + else if (rowid_filter) + { + /* If ICP wasn't used, get the number from Rowid Filter */ + uint val= rowid_filter->tracker->get_container_lookups(); + r_index_rows_is_zero= (val == 0); + r_index_rows= val / loops; + have_icp_or_rowid_filter= true; + } + + /* Print r_index_rows only if ICP and/or Rowid Filter were used */ + if (have_icp_or_rowid_filter) + writer->add_member("r_index_rows").add_double(r_index_rows); + writer->add_member("r_rows"); if (pre_join_sort) { @@ -2124,35 +2143,101 @@ void Explain_table_access::print_explain_json(Explain_query *query, writer->add_member("r_other_time_ms").add_double(extra_time_tracker.get_time_ms()); } trace_engine_stats(handler_for_stats, writer); - print_r_icp_filtered(handler_for_stats, tracker, writer); } /* `filtered` */ if (filtered_set) writer->add_member("filtered").add_double(filtered); - /* `r_filtered` */ + bool have_r_filtered= false; + double r_filtered; + /* Compute value of `r_filtered` - filtered of attached_condition */ if (is_analyze) { - writer->add_member("r_filtered"); if (pre_join_sort) { /* Get r_filtered value from filesort */ if (pre_join_sort->tracker.get_r_loops()) - writer->add_double(pre_join_sort->tracker.get_r_filtered()*100); - else - writer->add_null(); + { + have_r_filtered= true; + r_filtered= pre_join_sort->tracker.get_r_filtered()*100; + } } else { /* Get r_filtered from the NL-join runtime */ if (tracker.has_scans()) - writer->add_double(tracker.get_filtered_after_where()*100.0); + { + have_r_filtered= true; + r_filtered= tracker.get_filtered_after_where()*100.0; + } + } + + /* + Add r_total_filtered, as combined "filtered" of all kinds of filtering: + Rowid Filter, Index Condition Pushdown, attached condition. + */ + double r_total_filtered; + if (have_icp_or_rowid_filter) + { + double out_rows; + if (pre_join_sort) + out_rows= pre_join_sort->tracker.get_avg_returned_rows(); else - writer->add_null(); + out_rows= tracker.get_avg_rows_after_where(); + + if (r_index_rows_is_zero) + r_total_filtered= 100.0; + else + r_total_filtered= out_rows* 100.0 / r_index_rows; + } + else if (have_r_filtered) + r_total_filtered= r_filtered; + + writer->add_member("r_total_filtered"); + if (have_r_filtered) + writer->add_double(r_total_filtered); + else + writer->add_null(); + } + + /* + `index_condition[_bka]` + */ + if (pushed_index_cond) + { + writer->add_member(bka_type.is_bka? "index_condition_bka": "index_condition"); + write_item(writer, pushed_index_cond); + if (is_analyze) + print_r_icp_filtered(handler_for_stats, writer); + } + + /* `attached_condition` */ + { + /* + we are printing the condition that is checked when scanning this + table. + - when join buffer is used, it is cache_cond. + - in other cases, it is where_cond. + */ + Item *item= bka_type.is_using_jbuf()? cache_cond: where_cond; + if (item) + { + writer->add_member("attached_condition"); + write_item(writer, item); } } + /* `r_filtered` - filtered of attached_condition */ + if (is_analyze) + { + writer->add_member("r_filtered"); + if (have_r_filtered) + writer->add_double(r_filtered); + else + writer->add_null(); + } + for (int i=0; i < (int)extra_tags.elements(); i++) { tag_to_json(writer, extra_tags.at(i)); @@ -2787,12 +2872,12 @@ void Explain_update::print_explain_json(Explain_query *query, if (mrr_type.length() != 0) writer->add_member("mrr_type").add_str(mrr_type.ptr()); + double UNINIT_VAR(r_filtered); /* set and used when is_analyze==true */ if (is_analyze) { if (doing_buffering) { ha_rows r_rows; - double r_filtered; if (is_using_filesort()) { @@ -2811,7 +2896,8 @@ void Explain_update::print_explain_json(Explain_query *query, r_filtered= buf_tracker.get_filtered_after_where() * 100.0; } writer->add_member("r_rows").add_ull(r_rows); - writer->add_member("r_filtered").add_double(r_filtered); + /* Currently r_total_filtered == r_filtered for DMLs */ + writer->add_member("r_total_filtered").add_double(r_filtered); } else /* Not doing buffering */ { @@ -2822,8 +2908,9 @@ void Explain_update::print_explain_json(Explain_query *query, writer->add_null(); /* There is no 'filtered' estimate in UPDATE/DELETE atm */ - double r_filtered= tracker.get_filtered_after_where() * 100.0; - writer->add_member("r_filtered").add_double(r_filtered); + r_filtered= tracker.get_filtered_after_where() * 100.0; + /* Currently r_total_filtered == r_filtered for DMLs */ + writer->add_member("r_total_filtered").add_double(r_filtered); } if (table_tracker.has_timed_statistics()) @@ -2841,6 +2928,9 @@ void Explain_update::print_explain_json(Explain_query *query, write_item(writer, where_cond); } + if (is_analyze) + writer->add_member("r_filtered").add_double(r_filtered); + /*** The part of plan that is before the buffering/sorting ends here ***/ if (is_using_filesort()) writer->end_object(); diff --git a/sql/sql_explain.h b/sql/sql_explain.h index e7fe9b65b692a..6f9ee2bab2d7c 100644 --- a/sql/sql_explain.h +++ b/sql/sql_explain.h @@ -604,7 +604,7 @@ enum explain_extra_tag class EXPLAIN_BKA_TYPE { public: - EXPLAIN_BKA_TYPE() : join_alg(NULL) {} + EXPLAIN_BKA_TYPE() : join_alg(NULL), is_bka(false) {} size_t join_buffer_size; @@ -616,6 +616,9 @@ class EXPLAIN_BKA_TYPE */ const char *join_alg; + /* true <=> BKA is used */ + bool is_bka; + /* Information about MRR usage. */ StringBuffer<64> mrr_type; @@ -676,14 +679,6 @@ class Explain_rowid_filter : public Sql_alloc void print_explain_json(Explain_query *query, Json_writer *writer, bool is_analyze); - - /* - TODO: - Here should be ANALYZE members: - - r_rows for the quick select - - An object that tracked the table access time - - real selectivity of the filter. - */ }; @@ -870,7 +865,7 @@ class Explain_table_access : public Sql_alloc /* This is either pushed index condition, or BKA's index condition. (the latter refers to columns of other tables and so can only be checked by - BKA code). Examine extra_tags to tell which one it is. + BKA code). Examine extra_tags (or bka_type.is_bka) to tell which one it is. */ Item *pushed_index_cond; diff --git a/sql/sql_join_cache.cc b/sql/sql_join_cache.cc index 1ef4b3f44b48f..c23f469d9eacc 100644 --- a/sql/sql_join_cache.cc +++ b/sql/sql_join_cache.cc @@ -2718,6 +2718,7 @@ bool JOIN_CACHE::save_explain_data(EXPLAIN_BKA_TYPE *explain) explain->incremental= MY_TEST(prev_cache); explain->join_buffer_size= get_join_buffer_size(); + explain->is_bka= false; switch (get_join_alg()) { case BNL_JOIN_ALG: @@ -2728,9 +2729,11 @@ bool JOIN_CACHE::save_explain_data(EXPLAIN_BKA_TYPE *explain) break; case BKA_JOIN_ALG: explain->join_alg= "BKA"; + explain->is_bka= true; break; case BKAH_JOIN_ALG: explain->join_alg= "BKAH"; + explain->is_bka= true; break; default: DBUG_ASSERT(0);