[nycphp-talk] Local File versus DB-based configuration setting strategy
lars gelfan
ldgphp at www.ldgmedia.com
Sat Jul 8 22:45:47 EDT 2006
To clarify, I didn't mean an external .txt file, simply that (unless you are using a PHP optimizer) PHP is
stored as text and moving information via a database is _generally_ going to be more efficient -- but
that is why I said "theoretically" :) -- I realize there are many variables depending one's server setup
and the size of the config file.
In both cases the overhead is not exactly zero, but certainly miniscule (assuming your config file is
not gargantuan). I was simply pointing out that (especially) if you already have a database connection
open it is a viable solution and one that has worked for me. The fact that you have to store the
database connection info in a PHP script does make it a bit less than optimal solution, so I certainly
would be interested in hearing about alternatives and others' experiences. In my situation, it seemed
to make sense and has made deployment and maintenance easier.
-L
On Sat, 8 Jul 2006 16:21:01 -0400, Daniel Convissor wrote
> On Sat, Jul 08, 2006 at 02:30:53PM -0400, lars gelfan wrote:
> >
> > If you already have a database connection open then the extra hit is
> > really a non-issue and
> > theoretically would be faster than reading from a text file.
>
> Text file? Not what I was talking about -- nor I believe was Cliff.
> I'm talking about a PHP script, which would already be open to get
> the database configuration information anyway, so there's zero overhead.
>
> --Dan
>
More information about the talk
mailing list