This topic is locked

blob vs directory

1/16/2008 3:53:50 PM
PHPRunner General questions
D
dakk author

Wondering if anyone has experienced this and would share any solutions or opinions. I've created a php app that is storing a 80M pdf in Oracle as a blob data type and I created a php app that stores the same 80M pdf file in a file system. Once the file is commited to the database blob all php page accesses are very slow. If I delete the pdf data row access is fast once again. Storing the pdf in a file system, page access is fast always.

Sergey Kornilov admin 1/16/2008

Storing large files in a file system sounds like a good idea.

J
Jepsen 1/17/2008

Wondering if anyone has experienced this and would share any solutions or opinions. I've created a php app that is storing a 80M pdf in Oracle as a blob data type and I created a php app that stores the same 80M pdf file in a file system. Once the file is commited to the database blob all php page accesses are very slow. If I delete the pdf data row access is fast once again. Storing the pdf in a file system, page access is fast always.


dakk
You are really answering your own question.
I have also tried to store files (fhotos in jpg) as blob which sounded as a good idea. All related data in one place. However, backup and recovery in MySQLAdmin is not possible if binary data is stored as blob. And Backup is important, so I ended up moving all the photos out of the database and into file folders and redesign the tables, so I could backup the data.
rgds

Morten