MySQL Forums
Forum List  »  Performance

Re: Inserts in MySQL 8 are slower than Inserts in MySQL 5.6
Posted by: anand aundhekar
Date: September 20, 2019 03:26AM

mysql> select engine,data,indexes,total
-> from (
-> select
-> ifnull(engine,'TOTALS') as engine,
-> concat(data,' GB') as data,
-> concat(indexes,' GB') as indexes,
-> concat(tot,' GB') as total,
-> if(engine is null,-1,tot) as ord
-> from (
-> select
-> engine,
-> round( sum(data_length)/1024/1024/1024, 2 ) as data,
-> round( sum(index_length)/1024/1024/1024, 2 ) as indexes,
-> round( sum(data_length+index_length)/1024/1024/1024, 2 ) as tot
-> from information_schema.tables
-> where engine is not null and engine not in('information_schema','performance_schema')
-> group by engine with rollup
-> ) sums
-> ) list
-> order by list.ord desc;
+--------+-----------+----------+-----------+
| engine | data | indexes | total |
+--------+-----------+----------+-----------+
| InnoDB | 550.52 GB | 47.58 GB | 598.11 GB |
| CSV | 0.00 GB | 0.00 GB | 0.00 GB |
| TOTALS | 550.52 GB | 47.58 GB | 598.11 GB |
+--------+-----------+----------+-----------+
3 rows in set (6.50 sec)


mysql> select
-> substring_index(event_name,'/',2) as code_area,
-> sys.format_bytes( sum(current_alloc) ) as current_alloc
-> from sys.x$memory_global_by_current_bytes
-> group by substring_index(event_name,'/',2)
-> order by sum(current_alloc) desc;
Empty set (1.45 sec)


mysql> select
-> concat(format(a.num * 100.0 / b.num,2),"%") bufferpoolfullpct
-> from
-> (select variable_value num from performance_schema.global_status
-> where variable_name = 'innodb_buffer_pool_pages_data') a,
-> (select variable_value num from performance_schema.global_status
-> where variable_name = 'innodb_buffer_pool_pages_total') b;
+-------------------+
| bufferpoolfullpct |
+-------------------+
| 90.91% |
+-------------------+
1 row in set (0.36 sec)

Options: ReplyQuote




Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.