Re: [PHP-DB] blob versus file
On Tue, 2 Jul 2002 05:45:40 +0200 Andy [EMAIL PROTECTED] wrote: is the increase of the network traffic noticable? The query is pretty small just text. Do u really think this might increase the traffic? Try to heavely charge a DB with images inside it. Do the same without DB, that depends if the dbms is in another server or not, note localhost server can use the network interface and not the socket. then compare the two methods, and use the best :). Tests are always the best way to get the best methods :). I also noticed that the image is not cached anymore. Is this true for all blobs, or do I just access them in a wron way? Cached ? Client side ? hth pa -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] blob versus file
Hi, one point that you should keeped in mind is, if you have a cluster of webservers connecting to the same db-server, then you have to mount the filesystems, where you store the images on all webservers. On the other hand many db's like oracle have many restrictions with lobs. In oracle you can have only one LOB per table. And also functions like SELECT DISTINCT or GROUP BY are not supported on LOB-fields. MySQL is here the positive exception, because MySQL supports such functions also on LOB-fields. We store images and other documents on the filesystem, but text-data like session-data ist stored in LOB's, bye, Pierre-Alain Joye schrieb: On Tue, 2 Jul 2002 05:45:40 +0200 Andy [EMAIL PROTECTED] wrote: is the increase of the network traffic noticable? The query is pretty small just text. Do u really think this might increase the traffic? Try to heavely charge a DB with images inside it. Do the same without DB, that depends if the dbms is in another server or not, note localhost server can use the network interface and not the socket. then compare the two methods, and use the best :). Tests are always the best way to get the best methods :). I also noticed that the image is not cached anymore. Is this true for all blobs, or do I just access them in a wron way? Cached ? Client side ? hth pa -- -- Michael Bretterklieber LCP JAWA Management Software GmbH Liebenauer Hauptstr. 200 A-8041 GRAZ Tel: ++43-(0)316-403274-12 Fax: ++43-(0)316-403274-10 GSM: ++43-(0)676-93 96 698 [EMAIL PROTECTED] homepage: http://www.jawa.at - privat --- E-mail: [EMAIL PROTECTED] homepage: http://www.inode.at/mbretter -- ...the number of UNIX installations has grown to 10, with more expected... - Dennis Ritchie and Ken Thompson, June 1972 -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] blob versus file
On Tue, 02 Jul 2002 12:57:56 +0200 Michael Bretterklieber [EMAIL PROTECTED] wrote: Hi, one point that you should keeped in mind is, if you have a cluster of webservers connecting to the same db-server, then you have to mount the filesystems, where you store the images on all webservers. For multi-server images/docs server, we usually create a virtual host (images.domain.net), and avoid counter productive nfs or network filesystem. Generally, the method you choose depends of the portability level, maintenance, recovery system, ... Just test valident the different methods provided in this thread, you find the one fit to your needs. hth pa -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
FW: [PHP-DB] blob versus file
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:[EMAIL PROTECTED]] Sent: Monday, July 01, 2002 6:21 AM To: andy Cc: [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: Re: [PHP-DB] blob versus file On Mon, 1 Jul 2002 14:17:53 +0200 andy [EMAIL PROTECTED] 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 -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DB] blob versus file
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. Thank you for any comments on that, Andy PS: I was planing to store all the other images (20 - 50 KB) to blobs as well (thousands) but after this first experiance I am a bit confused if the performance would even more suffer. Would you guys recommend this? -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] blob versus file
On Mon, 1 Jul 2002 14:17:53 +0200 andy [EMAIL PROTECTED] 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
Re: [PHP-DB] blob versus file
is the increase of the network traffic noticable? The query is pretty small just text. Do u really think this might increase the traffic? I also noticed that the image is not cached anymore. Is this true for all blobs, or do I just access them in a wron way? (I am requesting a php file in the img tag with the statement inside and output them before sending a jpeg header with an echo) Thanx for your help, Andy Pierre-Alain Joye [EMAIL PROTECTED] schrieb im Newsbeitrag [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... On Mon, 1 Jul 2002 14:17:53 +0200 andy [EMAIL PROTECTED] 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