Alex Rivera | Logout

200,000 images in single folder in linux, performance issue or not?

Asked 2010-10-23T12:10:00.513
17

I have a php/mysql website with over 200,000 images in single folder (linux server). I don't think, that I will never need to see them in file explorer, instead they will be viewed on website on their individual pages. They are just displayed in product page on website. File system is ext3. so is it wise to save them in single folder? can it slow down the site's performance?

Edit
Report

1 Answer

2

I know an answer was chosen, I want to add a solution on improving the performance, for interest

Querying the directory listing each time will cost the most overhead, if the directory listing returns all results every time.

You can improve performance by storing the listing in an indexed database (say SQLite) and just query the results from there. You can select a subset of records and implement pagination much easier this way, and filter the results too.

answered 2010-10-29T10:00:43.513

Your Answer