Re: Advice on uploaded files

From: Date: Wed, 29 Jan 2003 15:34:03 +0000
Subject: Re: Advice on uploaded files
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-133523@lists.php.net to get a copy of this message
At 15:54 29.01.2003, Vladimir Galkov spoke out and said: --------------------[snip]-------------------- > Me too. I add tracks to DB only and store images as independent files. My >experiments with storing images in DB shows large memory use wich slow down >other processes (especialy if I need to choose several images from DB). > > But if pictures unnumerous and small (smaler 30-40kb) my advice - insert >them in DB. --------------------[snip]-------------------- Humm. I tend to have everything that's needed for reproduction in the DB - that means as well images, docs, etc, everything that gets uploaded. However there's a HUGE performance penalty for this, so I duplicate binaries to the filesystem. My classes are set up to try to open the file, and if that doesn't exist they gather it from the DB, cache them to the expected location, and continue serving. This method is used throughout our scripts, not only for binaries but also for all other cached items. It guarantees consistency when moving or restoring the system, and allows to simply clear all cache files without disrupting application functionality. Well, it gets slower for some time while rebuilding the cache... My 2c :-) -- >O Ernest E. Vogelsinger (\) ICQ #13394035 ^ http://www.vogelsinger.at/

« previous php.general (#133523) next »