HighDots Forums  

Images in database

alt.html alt.html


Discuss Images in database in the alt.html forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Luigi Donatello Asero
 
Posts: n/a

Default Images in database - 10-04-2003 , 04:51 PM






Is it true that I can speed up the loading of a website if I use a database?
I have many images on the website www.scaiecat-spa-gigi.com and they will
probably be more in the future.
Can you explain shortly how it happens?
Can you recommend very good pages which explain how I build a database using
mysql?



- -
Luigi ( un italiano che vive in Svezia)



http://www.scaiecat-spa-gigi.com/sv/...eramikett.html
http://www.scaiecat-spa-gigi.com/sv/boendeitalien.html










Reply With Quote
  #2  
Old   
William Tasso
 
Posts: n/a

Default Re: Images in database - 10-04-2003 , 05:00 PM






Luigi Donatello Asero wrote:
Quote:
Is it true that I can speed up the loading of a website if I use a
database?
loading data to the web site or loading data from the web site?

Quote:
I have many images on the website www.scaiecat-spa-gigi.com
and they will probably be more in the future.
I have found the best way to manage images is to store the path info in the
RDBMS - others may have different experience/results.


--
William Tasso - http://WilliamTasso.com




Reply With Quote
  #3  
Old   
David Dorward
 
Posts: n/a

Default Re: Images in database - 10-04-2003 , 05:31 PM



Luigi Donatello Asero wrote:

Quote:
Is it true that I can speed up the loading of a website if I use a
database?
Maybe... but I don't know of any databases that are supposed to be more
efficient then a normal file system[1], and most of the time taken is used
by transferring the data across the network, not in the webserver
retrieving the data from local store.

A database could be used to make it easier for you to _manage_ images, but
it wouldn't impact the speed at which they load.

[1] OK OK, technically speaking a normal file system is a database.


--
David Dorward http://dorward.me.uk/


Reply With Quote
  #4  
Old   
Luigi Donatello Asero
 
Posts: n/a

Default Re: Images in database - 10-04-2003 , 06:24 PM




"William Tasso" <news27 (AT) tbdata (DOT) com> skrev i meddelandet
news:blncb7$e8rdv$1 (AT) ID-139074 (DOT) news.uni-berlin.de...
Quote:
Luigi Donatello Asero wrote:
Is it true that I can speed up the loading of a website if I use a
database?

loading data to the web site or loading data from the web site?
Uploading I think. I read something somewhere about databases caching images
when the user opens the first page where they are contained. But I am not
sure whether I understood it properly.
For example I have the page
http://www.scaiecat-spa-gigi.com/sv/...eramikett.html where there are
already two images and according to
http://www.websiteoptimization.com/services/analyze/
they already seem to be too heavy and slowing down the page.
Would a database help?
Of course I could just set a picture on the page otherwise or make images
smaller but are they not already quite small?



- -
Luigi ( un italiano che vive in Svezia)



http://www.scaiecat-spa-gigi.com/sv/...eramikett.html
http://www.scaiecat-spa-gigi.com/sv/boendeitalien.html












Reply With Quote
  #5  
Old   
Hywel Jenkins
 
Posts: n/a

Default Re: Images in database - 10-04-2003 , 06:45 PM



In article <%MHfb.31564$dP1.96270 (AT) newsc (DOT) telia.net>,
jaggillarfotboll (AT) telia (DOT) com says...
Quote:
"William Tasso" <news27 (AT) tbdata (DOT) com> skrev i meddelandet
news:blncb7$e8rdv$1 (AT) ID-139074 (DOT) news.uni-berlin.de...
Luigi Donatello Asero wrote:
Is it true that I can speed up the loading of a website if I use a
database?

loading data to the web site or loading data from the web site?

Uploading I think. I read something somewhere about databases caching images
when the user opens the first page where they are contained. But I am not
sure whether I understood it properly.
Whether the database caches the image is irrelavant. The visitor's
browser still requests them from a URL, that URL either being directly
to a file or to a script that gets the image from a database.


Quote:
For example I have the page
http://www.scaiecat-spa-gigi.com/sv/...eramikett.html where there are
already two images and according to
http://www.websiteoptimization.com/services/analyze/
they already seem to be too heavy and slowing down the page.
That software is only beta - maybe there's a fault in it.


Quote:
Would a database help?
NOt for storing the images, no. The filesystem is already pretty good
at serving images. That said, I just modified a site with content
management to store images in a MySQL database because (for reasons
unkown) I can't delete them if they're uploaded via PHP.


Quote:
Of course I could just set a picture on the page otherwise or make images
smaller but are they not already quite small?
IMO they're fine. I don't know what they're for because I don't speak
Swedish, but I guess they're for sale.

--
Hywel I do not eat quiche
http://hyweljenkins.co.uk/
http://hyweljenkins.co.uk/mfaq.php


Reply With Quote
  #6  
Old   
Luigi Donatello Asero
 
Posts: n/a

Default Re: Images in database - 10-04-2003 , 07:14 PM




Quote:
Of course I could just set a picture on the page otherwise or make
images
smaller but are they not already quite small?

IMO they're fine. I don't know what they're for because I don't speak
Swedish, but I guess they're for sale.

You are right. They are for sale.
SEK= Swedish crowns.

- -
Luigi ( un italiano che vive in Svezia)



http://www.scaiecat-spa-gigi.com/sv/...kkeramik2.html
http://www.scaiecat-spa-gigi.com/sv/boendeitalien.html








Reply With Quote
  #7  
Old   
kchayka
 
Posts: n/a

Default Re: Images in database - 10-05-2003 , 11:37 AM



Luigi Donatello Asero wrote:
Quote:
For example I have the page
http://www.scaiecat-spa-gigi.com/sv/...eramikett.html where there are
already two images and according to
http://www.websiteoptimization.com/services/analyze/
they already seem to be too heavy and slowing down the page.
The two images on this page are not quite optimized.
26kb for a ~160x130px jpg is a bit much, it could be compressed quite a
bit more without significant loss of resolution.

Quote:
Would a database help?
A database will be no help where it comes to image optimization.

--
To email a reply, remove (dash)un(dash). Mail sent to the un
address is considered spam and automatically deleted.



Reply With Quote
  #8  
Old   
Toby A Inkster
 
Posts: n/a

Default Re: Images in database - 10-06-2003 , 03:01 AM



Hywel Jenkins wrote:
Quote:
That said, I just modified a site with content
management to store images in a MySQL database because (for reasons
unkown) I can't delete them if they're uploaded via PHP.
Possibly your images are saved with UID apache and only 'r-x' permissions
for other users.

If this is on your own server, you should be able to fix this using such
concepts as 'umask', but if you are on a shared server, possibly not.

--
Toby A Inkster BSc (Hons) ARCS
Contact Me - http://www.goddamn.co.uk/tobyink/?id=132



Reply With Quote
  #9  
Old   
Hywel Jenkins
 
Posts: n/a

Default Re: Images in database - 10-06-2003 , 09:47 AM



Toby A Inkster <UseTheAddressInMySig (AT) deadspam (DOT) com> wrote

Quote:
Hywel Jenkins wrote:
That said, I just modified a site with content
management to store images in a MySQL database because (for reasons
unkown) I can't delete them if they're uploaded via PHP.

Possibly your images are saved with UID apache and only 'r-x' permissions
for other users.

If this is on your own server, you should be able to fix this using such
concepts as 'umask', but if you are on a shared server, possibly not.
That is the reason - shared server. Even trying to "unlink" them with
PHP fails, so I figured the database option was the only way to go.
As some of the images are quite large (200kish) the site could quickly
fill up its file store. So far there doesn't seem to be much of a
performance hit on the site.

--
Hywel


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.