n******e 发帖数: 50 | 1 下面的query
select A, B from my_table where A = '...' limit 10000;
返回了三千多个记录, 这个过程竟然要三分钟多, 这叫什么DataBase?
老夫自己写个程序搜算了. 何况这个table 有两个index, 一个在A上,
一个在A+B上. 有index怎么还这么慢? 受不了. | n******e 发帖数: 50 | 2 A 只是一个长度不超过16的字符串而已.
【在 n******e 的大作中提到】 : 下面的query : select A, B from my_table where A = '...' limit 10000; : 返回了三千多个记录, 这个过程竟然要三分钟多, 这叫什么DataBase? : 老夫自己写个程序搜算了. 何况这个table 有两个index, 一个在A上, : 一个在A+B上. 有index怎么还这么慢? 受不了.
| a*****e 发帖数: 1700 | 3 A 不是 primary key 吧?
【在 n******e 的大作中提到】 : A 只是一个长度不超过16的字符串而已.
| n******e 发帖数: 50 | 4 Primary key 是 A+B, 按照mysql的说法, 这个primary key
能用上的.
【在 a*****e 的大作中提到】 : A 不是 primary key 吧?
| p**v 发帖数: 7 | 5 How big is your table? As far as I know, mySQL is the fastest database.
【在 n******e 的大作中提到】 : Primary key 是 A+B, 按照mysql的说法, 这个primary key : 能用上的.
| n******e 发帖数: 50 | 6 五百多万个记录.
【在 p**v 的大作中提到】 : How big is your table? As far as I know, mySQL is the fastest database.
| p**v 发帖数: 7 | 7 Then you need to reconfig your Mysql sever, it should be done in no time.
【在 n******e 的大作中提到】 : 五百多万个记录.
|
|