开发者

Is this a viable subdirectory System for storing files?

I read somwhere that you cannot put millions of files inside a single folder, and it is usual that people create subdirectories using a hash or somthing... I've read also that there is somthing to do with droping database and work only using NTFS. But i need database.

For my needs, and to the limits of my (poor) knowledge about coding I want to show you what I thought of and please you let me know if its viable.

This is how i thought of开发者_如何转开发 subdirectories using time

->my data/Year (infinite subdirectories)/ month per year (12 subdirectories)/ week per month (4 subdirectories) / days of a week (7 subdirectories) / hours per day (24 subdirectories) / minutes per hours (60 subdirectories)

What's good about it i think is that new data in time is faster accessed (because whats in the past dont mix with whats up to date) and the folders are quite empty, renewed I see that the problem would be if people send a lot of data within few time

i don't know, these are just some thought, maybe i should take time and understand hash subdirectories completly

thanks for any enlightnement


This question scares me a little :) I see a simple solution being adding timestamps to your database tables so you can easily query your data relevant to a specific date or date range. You could query data which is only in the past or only in the future, or only in the past but occurred after a specified date.

This is why relational databases are great and REPLACE file system solutions like the one you're suggesting.

MySQL can handle hundreds of millions of rows. Oracle can handle trillions. This is what they are meant for, James :)

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜