Slide 48
Slide 48 text
Storage Engines (2)
Verify the Storage Engines actually used on your database:
SELECT
SELECT COUNT
COUNT(
(*
*)
) as
as '# TABLES'
'# TABLES',
,
CONCAT
CONCAT(
(ROUND
ROUND(
(sum
sum(
(data_length
data_length)
) /
/ (
( 1024
1024 *
* 1024
1024 *
* 1024
1024 )
),
, 2
2)
),
, 'G'
'G')
) DATA
DATA,
,
CONCAT
CONCAT(
(ROUND
ROUND(
(sum
sum(
(index_length
index_length)
) /
/ (
( 1024
1024 *
* 1024
1024 *
* 1024
1024 )
),
, 2
2)
),
, 'G'
'G')
) INDEXES
INDEXES,
,
CONCAT
CONCAT(
(sum
sum(
(ROUND
ROUND(
((
( data_length
data_length +
+ index_length
index_length )
) /
/ (
( 1024
1024 *
* 1024
1024 *
* 1024
1024 )
),
, 2
2)
))
),
, 'G'
'G')
)
'TOTAL SIZE'
'TOTAL SIZE',
, ENGINE
ENGINE FROM
FROM information_schema
information_schema.
.TABLES
TABLES
WHERE
WHERE TABLE_SCHEMA
TABLE_SCHEMA
NOT
NOT IN
IN (
('mysql'
'mysql',
, 'information_schema'
'information_schema',
, 'performance_schema'
'performance_schema',
, 'sys'
'sys')
) GROUP
GROUP BY
BY engine
engine;
;
+
+----------+-------+---------+------------+--------+
----------+-------+---------+------------+--------+
|
| # TABLES | DATA | INDEXES | TOTAL SIZE | ENGINE |
# TABLES | DATA | INDEXES | TOTAL SIZE | ENGINE |
+
+----------+-------+---------+------------+--------+
----------+-------+---------+------------+--------+
|
| 1
1 |
| 0.00
0.00G
G |
| 0.00
0.00G
G |
| 0.00
0.00G
G |
| Aria
Aria |
|
|
| 5
5 |
| 0.00
0.00G
G |
| 0.00
0.00G
G |
| 0.00
0.00G
G |
| InnoDB
InnoDB |
|
|
| 1
1 |
| 0.00
0.00G
G |
| 0.00
0.00G
G |
| 0.00
0.00G
G |
| MyISAM
MyISAM |
|
+
+----------+-------+---------+------------+--------+
----------+-------+---------+------------+--------+
Copyright @ 2023 Oracle and/or its affiliates.
44