FW: [PHP-DB] blob versus file
| From: | USA) | Date: | Mon, 01 Jul 2002 17:25:29 +0000 |
| Subject: | FW: [PHP-DB] blob versus file | ||
| Groups: | php.db | ||
| Request: | Send a blank email to php-db+get-20241@lists.php.net to get a copy of this message | ||
I agree, it's definitely simpler and quicker to just store them in the file system and save the
file path in the database.
<>< Ryan
-----Original Message-----
From: Pierre-Alain Joye [mailto:paj@pearfr.org]
Sent: Monday, July 01, 2002 6:21 AM
To: andy
Cc: php-db@lists.php.net; php-general@lists.php.net
Subject: Re: [PHP-DB] blob versus file
On Mon, 1 Jul 2002 14:17:53 +0200
"andy" <news.letters@gmx.de> wrote:
> Hi there,
>
> I am wondering if anybody has experiance in saving images to blob in mysql.
>
> I do save images with 1 K and 4 KB to blob fields while I used to save them
> to file. It seams to me that this is much slower accessing the files. The
> images take a bit (really short but absolutly noticable) to show up on the
> site. Is there a way to improve the performance, and why is this happening?
> I thought the performance might even boost after storing them to blobs.
Not really, the OS filesystem contains features that makes it always faster than a sql query, that
will increase your network traffic too.
Inserting images or whatever binary data in a database does not have much sense, you could not do a
query with this field, cannot be indexed (dunno if exists a DB that implement a image indexer ;) ).
Storing relative pathes gave me always more portabilities between DBM.
In some case, you have to insert images (or every others binary data) in DB (due to global
permissions system only avaible for the DB and not for the filesystem, for example), but as far is
possible, I avoid to do it so.
IMHO :)
pa
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php