Showing posts with label mysql performance. Show all posts
Showing posts with label mysql performance. Show all posts

Thống kê các bảng có dữ liệu lớn trong mysql


Thống kê các bảng có dữ liệu lớn trong mysql

Rất hữu ích khi cần thống kê để đánh partion.

SELECT table_name, table_rows, data_length, index_length, round(((data_length + index_length) / 1024 / 1024 / 1024 ),4) as `Size(G)` FROM information_schema.TABLES WHERE table_schema = 'your_db_name' ORDER BY DATA_LENGTH DESC;

MySQL DATETIME vs TIMESTAMP vs INT performance and benchmarking with InnoDB

Following my tests with DATETIME vs vs TIMESTAMP vs INT performance and benchmarking with MyISAM storage engine, I’ve wondered about the performance impact using InnoDB, which is usually more peaky with I/O.
Test environment was pretty much the same:
So I went to do some benchmarks to see what we can conclude. The tests were run with:
  • MySQL 5.4.0-beta (although specific 5.4/Google SMP patch configuration options left as defaults);
  • Intel Quad core x 2800 MHz
  • Solaris 10
  • For each test, the tables were recreated to be positively sure there was no caching at all (also, but not every iteration, I did a filesystem cache flush) and the test itself was repeated a couple of times.
  • I should also note that the InnoDB logs and datafiles and the exported data resided on the same storage device.