File: innodb_virtual_stats.result

package info (click to toggle)
mariadb 1%3A10.11.11-0%2Bdeb12u1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 597,064 kB
  • sloc: ansic: 2,386,076; cpp: 1,663,071; asm: 378,311; perl: 62,203; pascal: 38,769; sh: 37,071; java: 33,919; sql: 19,830; yacc: 19,727; xml: 10,509; python: 9,522; ruby: 8,544; cs: 5,855; makefile: 5,793; ada: 1,700; lex: 1,207; javascript: 1,039; objc: 80; tcl: 73; awk: 46; php: 22
file content (87 lines) | stat: -rw-r--r-- 3,263 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
CREATE TABLE t (
a INT,
b INT,
c INT GENERATED ALWAYS AS(a+b),
d INT GENERATED ALWAYS AS(a+b+b),
KEY idxa (a),
KEY vidxcd (c, d)
) ENGINE=INNODB STATS_PERSISTENT=1 STATS_AUTO_RECALC=1;
INSERT INTO t (a,b) VALUES (1, 2);
SELECT index_name, stat_name, stat_description
FROM mysql.innodb_index_stats
WHERE database_name = 'test' AND table_name = 't';
index_name	stat_name	stat_description
GEN_CLUST_INDEX	n_diff_pfx01	DB_ROW_ID
GEN_CLUST_INDEX	n_leaf_pages	Number of leaf pages in the index
GEN_CLUST_INDEX	size	Number of pages in the index
idxa	n_diff_pfx01	a
idxa	n_diff_pfx02	a,DB_ROW_ID
idxa	n_leaf_pages	Number of leaf pages in the index
idxa	size	Number of pages in the index
vidxcd	n_diff_pfx01	c
vidxcd	n_diff_pfx02	c,d
vidxcd	n_diff_pfx03	c,d,DB_ROW_ID
vidxcd	n_leaf_pages	Number of leaf pages in the index
vidxcd	size	Number of pages in the index
ALTER TABLE t ADD COLUMN e INT GENERATED ALWAYS AS(a+a+b), ADD INDEX idxb (b), ALGORITHM=INPLACE;
select count(*) from t;
count(*)
1
SELECT index_name, stat_name, stat_description
FROM mysql.innodb_index_stats
WHERE database_name = 'test' AND table_name = 't';
index_name	stat_name	stat_description
GEN_CLUST_INDEX	n_diff_pfx01	DB_ROW_ID
GEN_CLUST_INDEX	n_leaf_pages	Number of leaf pages in the index
GEN_CLUST_INDEX	size	Number of pages in the index
idxa	n_diff_pfx01	a
idxa	n_diff_pfx02	a,DB_ROW_ID
idxa	n_leaf_pages	Number of leaf pages in the index
idxa	size	Number of pages in the index
vidxcd	n_diff_pfx01	c
vidxcd	n_diff_pfx02	c,d
vidxcd	n_diff_pfx03	c,d,DB_ROW_ID
vidxcd	n_leaf_pages	Number of leaf pages in the index
vidxcd	size	Number of pages in the index
ALTER TABLE t DROP COLUMN c, DROP INDEX idxa, ALGORITHM=INPLACE;
select count(*) from t;
count(*)
1
SELECT index_name, stat_name, stat_description
FROM mysql.innodb_index_stats
WHERE database_name = 'test' AND table_name = 't';
index_name	stat_name	stat_description
GEN_CLUST_INDEX	n_diff_pfx01	DB_ROW_ID
GEN_CLUST_INDEX	n_leaf_pages	Number of leaf pages in the index
GEN_CLUST_INDEX	size	Number of pages in the index
ALTER TABLE t ADD INDEX vidxe (e), ALGORITHM=INPLACE;
select count(*) from t;
count(*)
1
SELECT index_name, stat_name, stat_description
FROM mysql.innodb_index_stats
WHERE database_name = 'test' AND table_name = 't';
index_name	stat_name	stat_description
GEN_CLUST_INDEX	n_diff_pfx01	DB_ROW_ID
GEN_CLUST_INDEX	n_leaf_pages	Number of leaf pages in the index
GEN_CLUST_INDEX	size	Number of pages in the index
ALTER TABLE t ADD COLUMN f INT GENERATED ALWAYS AS(a + a), ADD INDEX vidxf (f), ALGORITHM=INPLACE;
select count(*) from t;
count(*)
1
SELECT index_name, stat_name, stat_description
FROM mysql.innodb_index_stats
WHERE database_name = 'test' AND table_name = 't';
index_name	stat_name	stat_description
GEN_CLUST_INDEX	n_diff_pfx01	DB_ROW_ID
GEN_CLUST_INDEX	n_leaf_pages	Number of leaf pages in the index
GEN_CLUST_INDEX	size	Number of pages in the index
ALTER TABLE t DROP INDEX vidxcd;
SELECT index_name, stat_name, stat_description
FROM mysql.innodb_index_stats
WHERE database_name = 'test' AND table_name = 't';
index_name	stat_name	stat_description
GEN_CLUST_INDEX	n_diff_pfx01	DB_ROW_ID
GEN_CLUST_INDEX	n_leaf_pages	Number of leaf pages in the index
GEN_CLUST_INDEX	size	Number of pages in the index
DROP TABLE t;