Re: Loading png images into a mysql table/database



Very True, I use to run a photo hosting web site and I experimented
with this in the beginning and oh man once there was 100,000+ images in
there the MySQL DB slowed down quite significantly. Almost 3 gigs of
data in a MySQL table is not the way to do it, I have found the file
system does a much better job holding and serving images.

What I ended up doing is just creating a simple mod 30 hash folder
setup to store all the actual photos and then have a table to store all
the attributes of the photos. This improved the performance very
significantly over the pure MySQL setup. Also separating the photos
into 30 different folders helped in case I actually had to do any
folder scans, it would not need to scan though all the photos just
1/30th of them.

I hope this helps.
Nick D.

On Dec 21, 10:57 pm, "seaside" <seaside...@xxxxxxx> wrote:
eholz1 schrieb:

Hello Members,

I am setting up a photo website. I have decided to use PHP and MySQL.
I can load jpeg files into the table (medium blob, or even longtext)
and get the image(s) to display without a problem.Just a small performance note:

If you use blobs and various other types, MySQL is likely to fall back
in table-scan mode which might slow down your queries very much. A
table-scan needs to read the full table data, at least much more, than
an index.

Even if you use some indexes, MySQL might not use them - the exact
behaviour depends on your indexes and queries.

Are there good reasons to keep image data in tables and not in file
systems - other than simpler coding, e.g.?

.



Relevant Pages

  • Re: Songbird...
    ... them into an album. ... The file exporer doesn't manage the photos, ... that does that manually by creating a folder structure yourself. ... photo managers import the images into their database, ...
    (uk.comp.sys.mac)
  • Re: copy certain files and preserve directory structure
    ... If you have the space you could duplicate the entire structure and then search just that folder for images, sort by size and delete the small images. ... preserving the original directory structure ... The photos are cryptically named ...
    (microsoft.public.windowsxp.general)
  • Re: hyperlinks for images
    ... The typical standard is to have a folder called 'images' on the main level, ... folder alongside the index page.) ... > As far as the photos themselves however, ...
    (microsoft.public.publisher.webdesign)
  • Re: best way to convert multiple photos from 16 bit to 8 bit - and resize.
    ... I've a quantity of photos at 16 bit Tiff in folders. ... I'd like to convert all the images in all the folders to 8 bit. ... and save it it to a folder of your choosing. ... and press "stop" on the recording action. ...
    (rec.photo.digital)
  • thumbnail rendering freezes XP Pro
    ... When I open up my photos or other folder containing ... Have tried deleting images but not related to bad photo ... while in thumbnail all OK but reopen the folder in view ...
    (microsoft.public.windowsxp.general)