development:database:mysql:count
Differences
This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
development:database:mysql:count [2025/04/02 03:40] – created tungnt | development:database:mysql:count [2025/04/02 03:45] (current) – tungnt | ||
---|---|---|---|
Line 2: | Line 2: | ||
{{ : | {{ : | ||
+ | |||
+ | MYISAM:lưu thông tin bảng vào metadata => count lấy nhanh | ||
+ | |||
+ | InnoDB: cần phải đảm bảo dữ liệu transaction là nhất quán => count chậm, lệnh "SHOW TABLE STATUS LIKE ' | ||
+ | |||
+ | Vậy tối ưu lệnh count như nào? khi không phải lúc nào cũng dùng MYISAM được? |
development/database/mysql/count.1743565201.txt.gz · Last modified: 2025/04/02 03:40 by tungnt