Discussion Locked

PHP Database Performance

0 helpful
6 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.
I would like to know more about the databases(e.g access, oracle) performance when we implement it together with PHP. Can anyone tell me the comparison of the performance for the scripting languages like ASP, PHP, CGI, PERL, based on tested result.

6 replies

by wls

The answer is that it depends on what you're doing and how well you write the queries.

In general, you're going to get a handle to the database, send it SQL, and get a response back. The interface layer for all the above is fairly low overhead.
Tricks:
- perform bulk operations
- precompile your SQL statements, don't use
dynamic ones if you can help it
- keep the database session handle open
until you don't need it -- or at least
pool them

I'd start with PHP, as you'll get a lot of documentation, it's easy, and you'll get error messages you can understand. Plus, it's portable.

by albert franco ii

We'll go one-by-one...

CGI: A mainstay in the field. Using PERL, Delphi, Java or C on the server it's dependable, but requires very strong programming skills. Note CGIs can be compiled or scripted depending on the language you use to program them. Speed, security and reliabilty are well within reach.

PERL: Very much a standard for CGI programming. Requires strong skills, but thera are lots of examples available for free. It is an interpreted language--but in spite of this manages decent speed.

PHP: It's new, it's powerful and it's free. There are tons of documents describing its use and deployment. Many consider it to be the "next Perl or HTML". They're probably right. It's a little early to say it's a secure product, but evidence looks good.

ASP: MS flagship. Being an MS product it suffers all of the usual MS problems: DISMAL SECURITY, tons of bugs, and problems with tech service. It is designed for people with less talent and/or experience. This makes it difficult to decide if all of the buggy ASP sites are due to inexperienced users or just buggy software. (I can point to a dozen ASP sites that don't return the second page of a search correctly or that loose the session pointer and bounce the user to the starting point. Real annoying!!)

All in all, I'd bet on PHP for the future. It has strong data manipulation features and is supported by a very strong user/developer community--precisely what has made the web possible. You'll also avoid paying MS and arm and a leg to keep using it.

Good Luck,
Al Franco, II
APF Creations
Pamplona, Spain

This discussion is closed to new replies.