查下你的表结构,是否在field_A 字段上有索引SELECT COUNT(*) FROM TABLE_A where field_B='2222' and field_C='3333' and field_D='4444' ;timeout SELECT COUNT(*) FROM TABLE_A where field_A='1111' and field_B='2222' and field_C='3333' ;timeout 根据你的查询条件,建议在field_A,field_B,field_C,field_D上建立符合索引
SELECT COUNT(*) FROM TABLE_A where field_A='1111' and field_B='2222' and field_C='3333' ;timeout 根据你的查询条件,建议在field_A,field_B,field_C,field_D上建立符合索引
http://topic.csdn.net/u/20081216/15/dfa80fca-fd6b-40d0-8b7d-944c4fa800ad.html
http://blog.csdn.net/claro/archive/2008/12/16/3531230.aspx
TABLE_A 总记录数不超过1W,
FIELD_A PK
FIELD_B,FIELD_C,,FIELD_D 非PK
该ERP数据库容量大约1.2G(计划尝试做压缩处理)
--try:
SELECT COUNT(1) FROM TABLE_A with(nolock) where field_B='2222' and field_C='3333' and field_D='4444'