简体   繁体   中英

Are query times linear in MySql?

如果我有一个包含100行的表(每行具有或多或少的恒定大小),并且SELECT WHERE 1 = 1查询平均需要花费0.004秒才能完成,那么可以假定使用相同的SELECT WHERE 1 = 1但可以一百万行

totalTime = 1.000.000*0.004/100

No, it is not ok to assume that. There are many variables ranging from your hardware to your database structure to the version of MySQL you use that can all affect how the query time will scale with more records.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM