MySQL Forums
Forum List  »  Newbie

Re: MySQL performance issues
Posted by: Peter Brawley
Date: March 27, 2020 10:22AM

My read of that innodb status report is that innodb isn't a significant part of this issue.

information_schema is. https://dev.mysql.com/doc/refman/8.0/en/information-schema-optimization.html describes how to optimise IS queries, but obviously only the developers of your app can implement such optimisations.

Queries against IS have been optimised in 8.0 as described in that link, but they're still not speed daemons. For example this simple query against IS ...

select * from information_schema.tables
where table_schema='mysql' and table_name='user';

... takes 13 times as long as the Show Tables cmd returning equivalent info ...

show table status from mysql where name='user';

IS queries in MySQL are implemented as queries against Views of underlying IS tables. MySQL Views are notoriously slow, so an app that makes prodigious use of IS needs to find faster solutions (eg the above) when IS queries are numerous enough to constitute a bottleneck. If I'm you, I ask the developers of your app if they can do more of that.

A second set of questions to explore: your Amazon platform, how RAM availability and your my.cnf settings play with RAM available and other hardware.

So, how much RAM does you machine have? And please run this query against your system and post the results?

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;

Options: ReplyQuote


Subject
Written By
Posted
March 26, 2020 08:24AM
March 27, 2020 04:27AM
Re: MySQL performance issues
March 27, 2020 10:22AM
March 27, 2020 11:14AM
March 27, 2020 12:41PM


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.