You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix the issue of 0 io_write issue when operating on partition table
Summary:
For partition tables, there are missing some info in the performance
schema table. They are io_write_bytes, io_write_requests, io_read_bytes
and io_read_requests.The current return value of these field are 0,
which is not the correct value. In this diff, the issue of 0 return
value is fixed.
Reviewed By: luqun
Differential Revision: D38227596
fbshipit-source-id: c561b33
Copy file name to clipboardExpand all lines: mysql-test/suite/rocksdb/r/bytes_written.result
+13Lines changed: 13 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -11,3 +11,16 @@ io_write > 0 io_write_requests
11
11
1 2
12
12
DROP TABLE stats_test_table;
13
13
SET GLOBAL rocksdb_perf_context_level=DEFAULT;
14
+
DROP TABLE IF EXISTS partition_table;
15
+
SET GLOBAL rocksdb_perf_context_level=3;
16
+
CREATE TABLE partition_table(a int, b int , c int) PARTITION BY RANGE (b) (PARTITION p0 VALUES LESS THAN (10), PARTITION p1 VALUES LESS THAN (20), PARTITION p2 VALUES LESS THAN (50));
17
+
INSERT INTO partition_table VALUES (12,12,12);
18
+
SELECT table_schema AS db, sum(io_write) AS bytes_written FROM sys.fb_ps_schema_table_statistics_io WHERE table_schema = "test" AND table_name = "partition_table" GROUP BY 1;
19
+
db bytes_written
20
+
test 25
21
+
INSERT INTO partition_table VALUES (25,25,25);
22
+
SELECT table_schema AS db, sum(io_write) AS bytes_written FROM sys.fb_ps_schema_table_statistics_io WHERE table_schema = "test" AND table_name = "partition_table" GROUP BY 1;
CREATE TABLE partition_table(a int, b int , c int) PARTITION BY RANGE (b) (PARTITION p0 VALUES LESS THAN (10), PARTITION p1 VALUES LESS THAN (20), PARTITION p2 VALUES LESS THAN (50));
40
+
41
+
# Insert a row into table
42
+
INSERT INTO partition_table VALUES (12,12,12);
43
+
44
+
# Check the io_write
45
+
SELECT table_schema AS db, sum(io_write) AS bytes_written FROM sys.fb_ps_schema_table_statistics_io WHERE table_schema = "test" AND table_name = "partition_table" GROUP BY 1;
46
+
47
+
# Insert more values
48
+
INSERT INTO partition_table VALUES (25,25,25);
49
+
50
+
# Check the io_write
51
+
SELECT table_schema AS db, sum(io_write) AS bytes_written FROM sys.fb_ps_schema_table_statistics_io WHERE table_schema = "test" AND table_name = "partition_table" GROUP BY 1;
0 commit comments