How to measure MySQL?

I am currently using MySQL Workbench. I want to see the difference in performance as the number of rows in the table increases. I want to specifically test and compare 1,000 lines, 10,000 lines, 100,000 lines, 1,000,000 lines, and 10,000,000 lines.

So, are there any tools that will allow me to do this and provide statistics on disk I / O, memory usage, CPU usage and time to complete the request?

+4
source share
1 answer

Yes. Benchmark is your best option, I think for some of them.

you can create simple queries:

jcho360> select benchmark (10000000,1+1); +--------------------------+ | benchmark (10000000,1+1) | +--------------------------+ | 0 | +--------------------------+ 1 row in set (0.18 sec) jcho360> select benchmark (10000000,1/1); +--------------------------+ | benchmark (10000000,1/1) | +--------------------------+ | 0 | +--------------------------+ 1 row in set (1.30 sec) 

the sum is faster than division (you can do this with all the things you can imagine.

I will recommend you take a look at this program, which will help you in this part of performance.

  • Mysqlslap (this looks like a benchmark, but you can tweak more results).
  • SysBench (processor performance test, I / O performance, mutex competition, memory speed, database performance).
  • Mysqltuner (with this you can analyze general statistics, statistics of the storage engine, performance indicators).
  • mk-query-profiler (perform SQL query analysis).
  • mysqldumpslow (it’s useful to know that witch issues are causing problems).

some of them are third-party, but I'm sure you can find tons of information called Google APP

+7
source

Source: https://habr.com/ru/post/1413642/


All Articles