Browse Source

add sql queries about innodb bytes and buffer_pool_size_utilization: https://dba.stackexchange.com/a/27341/179313

master
Markus Bergholz 1 year ago
parent
commit
939110a1f9
1 changed files with 32 additions and 0 deletions
  1. +32
    -0
      til.md

+ 32
- 0
til.md View File

@ -407,6 +407,38 @@ dump a live system without blocking
GRANT ALL PRIVILEGES ON `dev\_%` . * TO 'dev'@'%';`
```
### sum innodb data
```sql
SELECT
SUM(data_length + index_length) / POWER(1024, 3) Total_InnoDB_GigaBytes
FROM
information_schema.tables
WHERE
engine = 'InnoDB';
```
### show current used innodb_buffer_pool_size
```sql
SELECT (PagesData*PageSize)/ POWER(1024, 3) DataGB
FROM
(
SELECT
variable_value PagesData
FROM
information_schema.global_status
WHERE
variable_name = 'Innodb_buffer_pool_pages_data') A,
(
SELECT
variable_value PageSize
FROM
information_schema.global_status
WHERE
variable_name = 'Innodb_page_size') B;
```
# NetBSD
```


Loading…
Cancel
Save