Comments are available to members only. Sign up or Log in to view these comments.
Main Topics
Browse All TopicsWhat is the best way to organize a large number of files (and by large i mean about 1,000,000 jpg files). Right now I have a directory called photos. Within that directory is a folder for each userid. Within that folder are 3 more folders called thumbnails, images, and large which hold the 3 different size variations of the photo. Each photo is named after its unique photoId from 1 to 1,000,000. So for example my directory structure for user id 10 who has a photo of photo id 1445 would look like this.
photos/10/large/1445.jpg
photos/10/images/1445.jpg
photos/10/thumbnails/1445.
So my question is, does it matter that /photos/ will have 1,000,000 directories in it? Or would it benefit me to do something like:
photos/1/10/large/1445.jpg
where /1/ is a directory containing users 1-10,000. /2/ could contain users 10,001 to 20,000, etc
Are there speed concerns? Will the directory get to big and just come to a screeching halt? What is the recommended max size of files/folders to have in one directory?
I'm running on a big host on an unknown GNU/Linux. PHP Version 4.4.1.
Thanks.
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
Business Accounts
Answer for Membership
by: slyongPosted on 2006-01-04 at 01:30:55ID: 15606225
Comments are available to members only. Sign up or Log in to view these comments.