>I'm using mysql to hold references to image files then served on my pages 
>via PHP.
>
>I have typically a set of two files:
>
>thumb and a large original, on occasion there is also a variant inreasing 
>the set to 3 per image
>
>currently I am holding all of the files in 1 directory since the DB can 
>keep track of them, however their number has grown to over 400 at this 
>point
>
>my issue is whether it would be worth it (performance wise) to split them 
>into thumbs and works thus having 200+ files per directory as opposed to 
>so many, I am expecting the number of images to double in the future.

Are you noticing a slow-down with the 400 images in a single directory?...

If you're on Windoze, well, I suppose that might happen...

I wouldn't expect it under Un*x, but anything is possible, I guess...

If you're not actually *having* a problem, leave it alone :-)

And, if there is a problem, be *SURE* it's the number of files in the
directory causing it.  Move all the files but a couple out for a minute and
pound the site and see if it's better.

I wouldn't recommend going to thumbnail versus full-size, though, if you are
having problems.  That only puts the problem off for another few months or a
year...

Perhaps have a directory for each initial letter of the image filenames:
/images/
   /a/
       andi.jpg
       arntzen.jpg
   /b/
       beki.jpg
       bambi.jpg
   /c/
       charlie.jpg
.
.
.

That should divide your problem down quite nicely, and you won't have to
worry about it for a loooong time, assuming a reasonable distrobution of
filenames.

-- 
Like Music?  http://l-i-e.com/artists.htm
I'm looking for a PRO QUALITY two-input sound card supported by Linux (any
major distro).  Need to record live events (mixed already) to stereo
CD-quality.  Soundcard Recommendations?
Software to handle the recording? Don't need fancy mixer stuff.  Zero (0)
post-production time.  Just raw PCM/WAV/AIFF 16+ bit, 44.1KHz, Stereo
audio-to-disk.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to