简体   繁体   English

管理大型数据集

[英]Managing Large Datasets

I am developing a web based data analysis system and want to know what the best practices are when it comes to managing large datasets. 我正在开发一个基于Web的数据分析系统,并想了解在管理大型数据集时的最佳实践。 I'm housing the data in a MySQL DB and using php. 我将数据存储在MySQL数据库中并使用php。

For example if I wanted to be able to filter a data table on the fly I am aware of 2 options: 例如,如果我希望能够实时过滤数据表,我知道两个选项:

  1. Query the db once for all data and use javascript to filter data on the client side or 向数据库查询一次所有数据,然后使用javascript在客户端过滤数据或
  2. Execute a new query to update the data each time a filter changes 每次过滤器更改时执行一个新查询以更新数据

It seems to me that option 1 is the better/quicker option but is this a bad idea when the dataset get very big (ie >100k rows) 在我看来,选项1是更好/更快速的选项,但是当数据集变得非常大(即> 100k行)时,这是一个坏主意吗?

Maybe there are other better ways to tackle this but as of now I'm not aware of any so any suggestions would be much appreciated! 也许还有其他更好的方法可以解决此问题,但是到目前为止,我还没有发现任何建议,因此我们将不胜感激!

Thanks 谢谢

The best is to query the db only for your needs. 最好是仅查询您需要的数据库。

Then you load via ajax and query the other parts that you need when you need it. 然后,您通过ajax加载并在需要时查询所需的其他部分。

Rendering 100k rows on the client side will take too much time ;) 在客户端渲染10万行将花费太多时间;)

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

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