|
第一次用mysql 知道怎么优化
一张1000W的表 20个字段
select count(1) from table where datetime >t1 and datetime<t2 500毫秒
select count(1) from table where datetime >t1 and datetime<t2 and int(2)字段=1 3秒
datetime字段和int(2)字段都有索引 为何这么慢呢??
看不懂那些参数配置 哪位给指点下? 先行谢过了。。。。:)
内存配置如下:
----------------------
BUFFER POOL AND MEMORY
----------------------
Total memory allocated 6593445888; in additional pool allocated 0
Dictionary memory allocated 5973700
Buffer pool size 393216
Free buffers 1
Database pages 386409
Old database pages 142619
Modified db pages 2784
Pending reads 0
Pending writes: LRU 0, flush list 0, single page 0
Pages made young 23895, not young 0
12.63 youngs/s, 0.00 non-youngs/s
Pages read 434536, created 25214, written 1923003
6.67 reads/s, 1.11 creates/s, 127.74 writes/s
Buffer pool hit rate 998 / 1000, young-making rate 5 / 1000 not 0 / 1000
Pages read ahead 0.00/s, evicted without access 0.00/s, Random read ahead 0.00/s
LRU len: 386409, unzip_LRU len: 0
I/O sum[5022]:cur[0], unzip sum[0]:cur[0]
--------------
|
|