Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re: Optimizing a MySQL Query

by Cine (Friar)
on Aug 23, 2001 at 02:02 UTC ( [id://107164]=note: print w/replies, xml ) Need Help??


in reply to Optimizing a MySQL Query

In general, what you do is use the functions in mysql that tells you what the database will do with your query. See DESCRIBE SYNTAX. This will almost always tell you where you need a good index and also possible give you a hint of what to do with the query to make it faster.

T I M T O W T D I

Replies are listed 'Best First'.
Re: Re: Optimizing a MySQL Query
by mandrakus (Initiate) on Aug 23, 2001 at 19:04 UTC
    Tim, Thanks for the advice. I tried implementing the changes you suggested but that query still takes about 30 seconds to display the list on my website when the results number about 170 records. It only takes about 2 seconds to execute on the server. That makes me think it might possibly be a problem with data transfer. Do you have any more suggestions for me for finding out how to make this faster? Thanks, Axel
      There are two possibilites. You either have a bandwidth problem, which is easily checked my running you script on the server and in case is performs the same that is not the problem, or you are using plenty of modules and you are running plain CGI. The latter is most likely the problem and you should consider looking into modperl.

      T I M T O W T D I

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://107164]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others admiring the Monastery: (6)
As of 2024-04-25 11:50 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found