PDA

View Full Version : Best PHP/MySQL Practices



Mike
08-17-2006, 01:52 PM
It's a cold summers night, I'm bored, so let me ask all of the PHP/MySQL programmers what their best practices are for efficiency? Whether it be table design, functions, whatever, what are your best practices?

Let me just add, I've decided I want to alter the way I code. I've got a lot better over the last year or two, but still I don't think I'm "ultra efficient".

What are your best tips?

Mike

AndyH
08-17-2006, 07:33 PM
Use indexes
Avoid table sorts
Use InnoDB tables for ones which are causing lock waits (table vs row level locking)
Log slow queries
Keep your data as small as possible
Sacrifice normalization for performance

The New Guy
08-18-2006, 09:00 AM
You might find this helpful.

http://video.google.com/videoplay?docid=2524524540025172110&q=mysql+google&hl=en

AndyH
08-18-2006, 09:15 PM
Thanks for that. A few good tips in it.