Link to home
Start Free TrialLog in
Avatar of ICa
ICa

asked on

Performance Question: DB Query versus PHP Script Interpretation

Hello,
I wonder what has the better performance:

scenario 1) store constants (internationalized strings) in a DB and use PHP / SQL to retrieve them

scenario 2) genearate a large php file holding the values in ready to use PHP constants / array.

In other words: is there a performance gain using a "in-php-database" or does interpreting that php file defeat the object.

which has the better performance (response, server-load)?
ASKER CERTIFIED SOLUTION
Avatar of gregoryyoung
gregoryyoung
Flag of Canada image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
if the 1 huge file is to be used by lots of peoples over the internet or network, i'll go for PHP/ SQL
Firstly is because if a PHP / SQL will produce a response to a client with a small file size, only
the required data is attached. Besides that, 1 huge file will create unwanted web server delay (heavy workload),
if lots of requests are send to the web server.