Making a script run faster

Questions about the MySQL, PostgreSQL, and most other databases, as well as using it with PHP can be asked here.

Moderator: General Moderators

User avatar
nielsene
DevNet Resident
Posts: 1834
Joined: Fri Aug 16, 2002 8:57 am
Location: Watertown, MA

Post by nielsene »

Well you'll want to be a little more selective than that :) Indices will slow down inserts/deletes/updates slightly, but speed up selects. This looks like its an application where data is being inserted more of less continuously (logging), while selects are more user driven and rare? If that's the case you'd be hurting "general preformance/throughput" in favor of a less common operation. "Tuning" a database is almost always about such tradeoffs.
AlbinoJellyfish
Forum Commoner
Posts: 76
Joined: Sun Apr 04, 2004 7:39 pm

Post by AlbinoJellyfish »

WOW, ok thank you. I learned something new today from both of you. Got it from 45 seconds to 12 by combining some of the sql with the indices made a big difference.
Post Reply