views:

118

answers:

1

Hi All,

I have one procedure which retrieves all the records from one table which has more than 20000 records and two columns. the column i m trying to retrieve has the index on it.

But still it takes more than 1-2 minutes to execute.

Can anyone provide any input on this.

A: 

Slow_Query_log was helpful to sort this problem. I was using subqueries in the main query that was the problem.

Thanks for all your support.

MySQL DBA
In the future, use SO to get help optimizing your queries, but if you do, make sure that you include your query so people know what you're trying to do. Vague questions, such as, "My query's running slow" give us nothing to go on. We'd really like to help, so give us a chance to!
Eric