Connecting Tech Pros Worldwide Forums | Help | Site Map

how to reduce(decrease) query execution time

Member
 
Join Date: Aug 2007
Posts: 120
#1: Mar 15 '08
hello friends,

I need some solution for reducing the query execution time.

Let me explain briefly:

I have 5000 records in mysql database. actually i am using browse buttons to see the records. i,e forward, backward and fastforward etc.. if i press forward button it will show one record in their respective text field.

so my problem is if i submit forward button it's taking more time to load values in the text box, and one more i already indexded all fields in the mysql table.

if total record no is less i.e (1-100) it was not taking much time to show records.

finally how i can reduce this execution time. please let me know.

thank u

ronverdonk's Avatar
Moderator
 
Join Date: Jul 2006
Location: The Netherlands
Posts: 4,139
#2: Mar 15 '08

re: how to reduce(decrease) query execution time


When you setup and read just one row each time, that of course will cost resources. It is cheaper to read all rows in one select into some sort of cache or your own storage storage and browse the result set.


Ronald
Member
 
Join Date: Aug 2007
Posts: 120
#3: Mar 19 '08

re: how to reduce(decrease) query execution time


Thanks for the reply,

Mr. Ronald I did not get your points, please explain me in briefly.
ronverdonk's Avatar
Moderator
 
Join Date: Jul 2006
Location: The Netherlands
Posts: 4,139
#4: Mar 19 '08

re: how to reduce(decrease) query execution time


I mean that by reading the entire row set into storage (only 5000 rows) you browse hence and forth through storage arrays and you don't have to physically read a table row each time you go forward or backward.

Show your code here (and do it within code tags!) and we will discuss any possible improvements in your query times.

Ronald
Reply