You are here: Re: Loading png images into a mysql table/database « PHP Programming Language « IT news, forums, messages
Re: Loading png images into a mysql table/database

Posted by eholz1 on 12/22/06 21:03

Hello Nick and Seaside (an den See!!),

The only reason I have for putting the image data in the table is for
learning and fun(??).
but it does seem like a better idea (now) to use a file system scheme,
like Nick mentions.

I will do a little research on the term "mod 30 hash folder" (i am
fairly new to this!!), and see what I can do with it. I may need to
get back and ask more questions.

Thanks for the good info,

eholz1 aka ewholz


Nick DeNardis wrote:
> 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...@mac.com> 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.?

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация