MySQL Forums
Forum List  »  Newbie

Re: Question about BLOB datatypes
Posted by: Phillip Ward
Date: July 24, 2019 08:40AM

Quote

How about the performance if I store LARGEBLOB?

It's not so much the performance of any data type that's the issue here.

It's the whole process of taking the image, storing it into the database and then, whenever the image is needed, retrieving the image data, writing it to a disk file and then sending [the URI of] that file to the client's browser in order for it to be displayed.

All this, instead of leaving the image in a disk file all the time and only holding a note of where that file is in the database.

* Zero overhead putting the image into the database.
* Zero overhead in getting the image out of the database, because it's already sitting in a file, where it needs to be. [/list]

Hence, better performance.

Quote

Is there a datatype to store just the path of the image just like Oracle's BFILE or I have to do it manually in my code?

varchar will do perfectly well.

Regards, Phill W.

Options: ReplyQuote


Subject
Written By
Posted
Re: Question about BLOB datatypes
July 24, 2019 08:40AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.