MySQL Forums
Forum List  »  Performance

Re: speed up query
Posted by: laptop alias
Date: April 18, 2010 04:04PM

I'm not too hot at this stuff, but as a start I'd be tempted to throw an index onto site.dslam_region and see where that gets you.

Also, please format your queries for human readability, e.g.:

SELECT AVG(snrup)   	snrup
     , AVG(snrdown) 	snrdown
     , sip.id		id
     , s.dslam_region	dslam_region
  FROM dsl_data		dd
  JOIN dslam_ports 	dp
    ON dp.id = dd.port_id
  JOIN site_ip		sip
    ON sip.id = dp.dslam_id
  JOIN site         	s 
    ON s.id = sip.did
 WHERE s.dslam_region='itr'
   AND dd.time BETWEEN '2010-01-01' AND '2010-02-01' 
 GROUP 
    BY s.id 
 ORDER 
    BY snrdown DESC;

Options: ReplyQuote


Subject
Views
Written By
Posted
4141
April 18, 2010 06:42AM
Re: speed up query
1509
April 18, 2010 04:04PM
1591
April 18, 2010 05:40PM
1317
April 27, 2010 02:29PM
1463
April 27, 2010 07:59PM
1320
April 28, 2010 12:12AM
1580
April 28, 2010 06:22AM
1523
April 29, 2010 01:03AM
1378
April 29, 2010 02:17AM
1384
April 29, 2010 08:19AM
1386
April 29, 2010 09:18AM
1314
April 30, 2010 12:30AM
1570
April 30, 2010 07:47AM
1487
April 30, 2010 08:21AM
1398
April 30, 2010 10:08AM
1319
May 01, 2010 02:34AM
1335
May 01, 2010 09:54AM
1289
May 01, 2010 10:48AM
1417
May 01, 2010 02:20PM
1356
May 02, 2010 03:54AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.