Hello.


This is a good start point:

  http://dev.mysql.com/doc/mysql/en/mysql-optimization.html









Sebastian <[EMAIL PROTECTED]> wrote:

> i have a table with several thousand records. i want to know if adding 

> an index will improve things, example:

> 

> -------------------------------------

> | id | item | text | runtime | dateline

> -------------------------------------

> 

> now say i create this query:

> 

> $stats = mysql_query("

> SELECT COUNT(*) as total, AVG(runtime) as avgtime

> FROM table WHERE dateline > ".strtotime('6 hours ago')."

> ");

> 

> should dateline be an index?

> basically, i would like to know when i should create an index, when an 

> index is not needed, and what columns should be indexes..

> 

> any urls which explains all this would be helpful.

> 



-- 
For technical support contracts, goto https://order.mysql.com/?ref=ensita
This email is sponsored by Ensita.NET http://www.ensita.net/
   __  ___     ___ ____  __
  /  |/  /_ __/ __/ __ \/ /    Gleb Paharenko
 / /|_/ / // /\ \/ /_/ / /__   [EMAIL PROTECTED]
/_/  /_/\_, /___/\___\_\___/   MySQL AB / Ensita.NET
       <___/   www.mysql.com




-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to