G
G
Governor2020-05-08 22:29:17
Data processing
Governor, 2020-05-08 22:29:17

How to store photo albums?

It is necessary to store many albums with photos on the site, there are hundreds of photos in 1 album, the number of albums is not limited.
The database table stores the album key and the URL to the photo.
The problem is that all the pictures are in one folder, and their number will grow over time.

What will happen when there are more than a million of them?
Will the file system handle this amount in a decent amount of time, or does it need to be divided into subfolders of albums?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Saboteur, 2020-05-09
@Mr-Governor

Looking what file system. But for modern file systems there is no problem.
Listing may take time (find for a folder with 3 million files on a regular server - 16 GB, 4 cores, ssd - took 3-5 minutes), but access to one specific file by the full path will be almost instantaneous.
But in principle, it is better to split into subfolders.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question