KTM
KTM

Reputation: 868

Increase mysql performance

I have a table contains 5000 records . When i am querying the table (with 30 columns) for a selection of a 500 records itself , its taking 30 seconds . How can i reduce this time of retrieving data from MySQL ? I was indexing 3 main integer type columns in the table including primary key . Is there any other workarounds ?

Sample query : select * from my_table where my_condition LIMIT 500

Upvotes: 0

Views: 69

Answers (1)

iceraj
iceraj

Reputation: 359

For a query of a table with 5000 record to take 30 seconds you must by starving you DB of memory or having very slow disk. While indexing will help, it will only help if you don't have slow disk and no memory.

Upvotes: 1

Related Questions