MySQL Forums :: General :: Jet Profiler says I'm slow....


Advanced Search

Jet Profiler says I'm slow....
Posted by: Hans de Bruin ()
Date: August 30, 2012 08:16AM

Hi people,

Hope someone can help me here. I am analyzing my php/mysql project using
JetProfiler, and it warns me of several slow queries. There's one here I would like to figure out with your help.

The table has about 250,000 rows. Users are able to browse through them 20 at a time. The query looks like this:

SELECT * FROM items WHERE CAT='sports' ORDER BY DATUM DESC LIMIT 31900,20

Explain on JetProfiler says: JOIN SIZE 56,841 (VERY BAD,VERY SLOW) using FILESORT (BAD)

Now, obviously this is a google spider browsing through all the items (which is good) so the LIMIT 31900,20 seems to slow it down. Am I right in thinking that with this query it SELECTS about 32000 rows to display the last 20 ? Where does the 56,841 join size come from ?

CAT has a BTREE index (cardinality 48) as well as DATUM (the date).

Is there any other way to select 20 rows, skipping the first 32,000 ?

Options: ReplyQuote


Subject Written By Posted
Jet Profiler says I'm slow.... Hans de Bruin 08/30/2012 08:16AM
Re: Jet Profiler says I'm slow.... Xhavick Past 08/30/2012 03:06PM
Re: Jet Profiler says I'm slow.... Hans de Bruin 08/30/2012 08:12PM
Re: Jet Profiler says I'm slow.... Rick James 08/31/2012 10:25AM
Re: Jet Profiler says I'm slow.... Hans de Bruin 08/31/2012 11:01AM
Re: Jet Profiler says I'm slow.... Hans de Bruin 08/31/2012 11:25AM
Re: Jet Profiler says I'm slow.... Rick James 08/31/2012 06:30PM
Re: Jet Profiler says I'm slow.... Hans de Bruin 09/01/2012 06:54AM
Re: Jet Profiler says I'm slow.... Rick James 09/01/2012 08:38AM
Re: Jet Profiler says I'm slow.... Hans de Bruin 09/02/2012 01:03PM
Re: Jet Profiler says I'm slow.... Peter Brawley 08/30/2012 09:59PM


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.