Reputation: 2358
I have developed php application working with 20000 records from mysql table now i am facing slow connection problem.
it takes 15-20 seconds to retrive more then 1000 records and 5-6 secords to retrive only 5 records.
so is there any way to speedup mysql operation. i have used xampp 1.3.2 and mysql version 5.5.32
thanx
Upvotes: 0
Views: 1306
Reputation: 40220
You said you are running XAMPP... if you are on Windows then install the full mysql enviroment and you will get much better performance. Get the Community Edition from mysql.com.
If you are running Linux, make sure mysql is installed as a service and not as an application. You may also be interested in upgrating to mariaDB.
Aside from that, use indexes for all the query parameters you are using (those in your where caluse).
Also, note that some MySQL engines are faster than others, for example MyISAM may run faster than InnoDB at expense of the lack of real foreign keys.
Upvotes: 1
Reputation: 659
20000 records is nothing for MySQL, performance of query depends on many factors,
Upvotes: 2
Reputation: 115
you can create index on table!
http://dev.mysql.com/doc/refman/5.0/en/create-index.html
Upvotes: 1