Solved

Performance Question: DB Query versus PHP Script Interpretation

Posted on 2004-07-30
4
140 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
4 Comments
 
LVL 37

Accepted Solution

by:
gregoryyoung earned 75 total points
Comment Utility
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
Comment Utility
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

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

Suggested Solutions

Preface In the first article: A Better Website Login System (http://www.experts-exchange.com/A_2902.html) I introduced the EE Collaborative Login System and its intended purpose. In this article I will discuss some of the design consideratio…
I will show you how to create a ASP.NET Captcha control without using any HTTP HANDELRS or what so ever. you can easily plug it into your web pages. For Example a = 2 + 3 (where 2 and 3 are 2 random numbers) Session("Answer") = 5 then we…
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

772 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now