?
Solved

Performance Question: DB Query versus PHP Script Interpretation

Posted on 2004-07-30
4
Medium Priority
?
147 Views
Last Modified: 2010-04-06
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)?
0
Comment
Question by:ICa
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
4 Comments
 
LVL 37

Accepted Solution

by:
gregoryyoung earned 300 total points
ID: 11699591
how large of an array are we talking about ? using multiple constant includes as opposed to 1 huge file could help alleviate this (only include what your need) this _should_ be substantially faster.

0
 
LVL 11

Expert Comment

by:kelvinwkw
ID: 12041194
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.
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Most of the sites are being standardized with W3C Web Standards. W3C provides lot of web standard services to the web. They have the web specification, process and documentation for all the web standards. You can apply HTML, CSS and Accessibility st…
Article by: Matthew
I am a very big proponent of technology compliance standards and strive to meet such criteria in all of my work. That includes my site, which is 100% XHTML 1.0 compliant as determined by the World Wide Web Consortium. https://www.matthewstevenkel…
Viewers will learn about if statements in Java and their use The if statement: The condition required to create an if statement: Variations of if statements: An example using if statements:
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.
Suggested Courses

752 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question