I'm building a small magazine website which I plan on using daily, but I'm wondering if I should store my article images and videos as physical files or as BLOB in my MySQL Table.
My primary concern is that I'm told it slows down your site if you use blob data, but I don't know if that's when using all information in a single table, or just using them period.
My ideal setup would be to have 2 tables:
article_table:
ID | Title | Image | Article
-------------------------------
int | varchar | int | text
blob_table:
ID | Name | Blob
--------------------
int | varchar | blob
So, when I load up my article, based on the ID, I would then select my blob image where the ID's match:
if(isset($_GET["id"])){$id = $_GET["id"];}else{
header("Location: http://www.wesbite.com");
exit();
};
$blob_sql = "SELECT * FROM blob_table WHERE id = '$id'";
$blob_res = mysqli_query($con, $blob_sql);
Using this method, what would be the effect on having a vast mumber of records in the blob_table, when trying to display them on the article.php page?
Also, does anyone know if there is a difference in the size of a file that is physically stored vs that of a blob? i.e. if a physical JPG is 320KB, what would be the equivelant size of the blob table cell.
Finally - Is there a difference in the actual upload speeds when comparing uploading a blob to uploading a physical file?
Thank you.