简体   繁体   English

这是使用mysql进行数据库快速检索的有效方法

[英]which is efficient way to make a database using mysql for faster retriving

I have to make a database which will be having 200000 rows in table1 & 10000 rows in table2,3,4,5 like that. 我必须制作一个数据库,这样在table1中将有200000行,在table2、3、4、5中将有10000行。 i will be using mysql. 我将使用mysql。 so which approach will give me faster result. 所以哪种方法可以给我更快的结果。

  1. Distributing data to multiple tables, 将数据分配到多个表,
  2. Keeping less number of tables with lots of rows. 保留较少的具有大量行的表。

What is the speed of mysql to traverse a table and to join them & traverse. mysql遍历表并将其加入并遍历的速度是多少?

Your first concern about table design should be normalization and correct indexes. 关于表设计的第一个问题应该是规范化和正确的索引。

If you encounter performance deficits (I doubt that with 200000 rows, thats not that much), then measure the difference with normalized and denormalized structures. 如果遇到性能缺陷(我怀疑使用200000行,那不是很多),然后使用规范化和非规范化结构来测量差异。

Only denormalize after you have benchmarked and confirmed that the denormalized structure is really faster. 只有在进行基准测试并确认非正规化结构确实更快之后,才能进行非正规化。 So, if your number two means normalized tables with 200 000 rows, I would go with number two. 因此,如果您的第二个数字表示具有20万行的规范化表,那么我将使用第二个数字。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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