79574249

Date: 2025-04-15 01:41:28
Score: 1
Natty:
Report link

I have a pretty good solution, wich is working since 2008 without problems, we are storing close to 500,000 files of diferent types by using 2 separate tables.

Performance is amazing, and memory usage very low because one table (METADATA) only stores metadata describing the uploaded file, including one field(id) pointing to the second table (CONTENT) wich contains a BLOB field(the actual file) and an ID field to link its metadata.

All searching is done on the metadata table, and when we decide to download a file the ID field allow Us to download the content of only that specific record from the second table.

We insert new files on the CONTENT table, and the new ID field is used to insert another record on the METADATA table and register the descriptive info of the file, like name, size, type, user,etc.

METADA is like a directory of the files. Small Table.

CONTENT is the repository of the files with their key (ID).Huge Table.

In the second table We store files as big as 256MB in Mysql.

Reasons:
  • Long answer (-0.5):
  • No code block (0.5):
  • Low reputation (1):
Posted by: Roberto Rios