On Friday, June 21, 2002, at 11:19  AM, mike wrote:

> I was reading somewhere (can't remember where) that connecting to a db 
> is a
> pretty costly transaction.  DB queries aside, does anyone know of any
> benchmarks that demonstrate file access vs. db connections?
>
> Similarily, while DB queries offer alot of power, would it be cheaper
> (faster) to drop simple information that does not require heavy queries 
> into
> a file and access it through the file system?

I don't have any stats, but I think it really depends.  If you're 
executing a really complex query that uses like six JOINs and eight 
WHERE clauses, then the bottleneck is the DB and not the DB access 
itself, so it would probably be quicker to have this information ready 
in a file (or even better, cached in memory somehow, though I have no 
experience doing this).  But I believe that with a simpler DB query, a 
DB access is faster than a file read.

Here's something that turned up in Google...
http://phplens.com/lens/php-book/optimizing-debugging-php.php


Erik




----

Erik Price
Web Developer Temp
Media Lab, H.H. Brown
[EMAIL PROTECTED]


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

Reply via email to