Helping ordinary people create extraordinary websites!

Go Back   Web Development Forum > Website Programming > Database Development
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 01-24-2008, 09:35 PM
Junior Member
 
Join Date: Jan 2008
Posts: 24
Default MySQL Query Optimization Strategies

Hi again,
I have several queries running on my site and being on a shared plan I am becoming more and more aware that optimizing these queries is essential to the efficient running of my site. Can anyone suggest to me some ways in which I can optimize my queries and in general have my MySQL database running efficiently.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 01-25-2008, 06:40 AM
BigAlReturns's Avatar
Moderator Extraordinaire!
 
Join Date: Dec 2007
Location: The Wirral, England
Posts: 298
Send a message via MSN to BigAlReturns
Default

Basically you need to normalise your database, and then run as few and as efficient queries as possible. You can find out how long your queries take to run using microtime as below:
PHP Code:
$starttime=microtime();
// run query
echo ($starttime microtime()); 
To help you optimise specific queries we'd need to see your DB structure and the queries you're currently using.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -5. The time now is 04:46 PM.


Website Design by Ducani Media Group
Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.