Re: High bandwidth application tips

From: Date: Thu, 06 Nov 2003 06:25:49 +0000
Subject: Re: High bandwidth application tips
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-168677@lists.php.net to get a copy of this message
Jay Blanchard wrote:
[snip]
limit the number of times you need to hit the database.
I second Chris on this. [/snip] I third that. The problem can become especially apparent in large databases containing millions of records. Other than that just code cleanly and document, document, document.
Creating indexes on columns that appear in your WHERE clauses can drastically increase performance when hitting the database. Be sure to read your database documentation on creating indexes. A simple example of this would be a "forgot your password" script that emailed a user based on the user's email address. By indexing the email address field, your query will run much faster than without the index, and if you have several thousand records in your table, you will surely notice the difference.

« previous php.general (#168677) next »