如何管理文件夹中的大量数据
我有超过 25000 人的数据,我如何管理这些数据,以免出现性能问题
i have more than 25000 people data how can i manage this data so that there is no performance issue
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
如果您想将其保存在文件中(而不是数据库中),一件重要的事情是将它们分散到子文件夹中。平均而言,单个文件夹中包含 25000 个以上文件的访问速度比访问包含 100 个文件的 250 个子文件夹要慢得多。
If you want to keep it in files (and not in a DB), one important thing would be to spread them into subfolders. 25000+ files in a single folder will be much slower to access than 250 subfolders containing 100 files on the average.
需要更多信息。
您担心哪些性能问题?存储空间?查找速度?写入速度?
数据是如何排列的?
一般来说,这样的数据集自然会存储在数据库中 - 您考虑将其存储在文件夹中是否有特定原因?文件夹通常要求您决定特定的查找系统/键,而数据库则允许您根据需要对数据进行切割。
More info needed.
What performance issues are you concerned about? Storage space? Lookup speed? Write speed?
How is the data arranged?
Generally such a data set would be naturally stored in a DB - is there a specific reason why you're looking at storing it in folders? Folders will egenrally require you to decide on a specific lookup system/key, wheras a DB allows you to dice the data however you wish.
对于输入/输出,请确保读取器和写入器已缓冲。
For input/output, make sure the readers and writers are buffered.