-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

> Though I didn't originate this, thanks for the advice. I was going
> to pose the question today regarding using text in a database
> versus just having CF include a .htm file of the text by way of 
> referencing the file
> name in the db.
> 
> If I could pose a slightly different question (I assume 
> you're somewhat
> familiar with Access 2K), how significant is the storage 
> overhead for a
> memo field storing text versus that text in a .htm file? Assuming
> the size of the text is roughly that of a newsletter or magazine
> article.  

Well.....  That depends (depends on what?...)

I'd need to know a bit more about the site to make a judgment call on
this one, but here's what I'd keep in mind:

If you're not already using a database, and you have no need for one
elsewhere on the site, then files might be better.  It all depends on
the quantity of articles you're looking at tho.  If you're already
using a DB, then I'd say you might as well go ahead & use it.

As far as how much overhead a memo field entails...  For the most
part, a DB hit is a DB hit, performance-wise.  If you hit the DB &
bring back two characters, it's really not a whole lot less load that
hitting the DB and bringing back a few K.  The overhead of setting up
the DB connection, firing off the query, and waiting for the response
is where all of your lag comes in.  The actual transfer of data from
OLEDB/ODBC is a fairly minor part of the time involved.  Since you
plan to store filenames in the database anyways, I think you'll find
faster access just getting the content from the DB.  You've already
paid the price of a database lookup, so you might as well get *all*
of the data and not bother with a second trip to the disk to get the
content from a separate file.  And that's not to mention wasted disk
space from all those HTML files.

Now...  Depending on how your news will be obtained and/or modified,
there could be some good arguments for a file based solution.  If
humans need to cull the news and potentially edit it, then individual
files might be easier -- especially if your HTML folks like FrontPage
or similar file based editors.  If you're just going to grab the news
from another site & dump it into the DB site unseen, then I don't see
much benefit to using individual files.

Another benefit of using the DB:  If you have a bunch of RAM
available and/or you don't have too many articles that would be in
your active set, then you could cache the DB queries that retrieve
the articles.  That way, once an article is retrieved once, it should
be held in memory & served out fairly quickly for the rest of the
viewers.

Again, tho... Everything depends on the quantities of articles,
viewers, and general server resources.  If you're expecting a fair
number of users and have a moderate to small number of articles, then
I think storing the text in the DB & using query caching will result
in the best performance.  YMMV, of course...

Best regards,
Zac Bedell

-----BEGIN PGP SIGNATURE-----
Version: PGPfreeware 6.5.8 for non-commercial use <http://www.pgp.com>

iQA/AwUBOf7wAqvhLS1aWPxeEQLVBwCgyFAao2/hIrZ80USKGy05X217xvwAmgM+
FndtiV7tATjyFOAzodaVXuQ2
=XvMN
-----END PGP SIGNATURE-----
------------------------------------------------------------------------------------------------
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists or send a message 
with 'unsubscribe' in the body to [EMAIL PROTECTED]

Reply via email to