title: Fix Using where; Using temporary; Using filesort
body: <p>I have two simple tables:</p>
  
  <pre><code>CREATE TABLE cat_urls (
    Id int(11) NOT NULL AUTO_INCREMENT,
    SIL_Id int(11) NOT NULL,
    SiteId int(11) NOT NULL,
    AsCatId int(11) DEFAULT NULL,
    Href varchar(2048) NOT NULL,
    ReferrerHref varchar(2048) NOT NULL DEFAULT '',
    AddedOn datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
    GroupId int(11) DEFAULT NULL,
    PRIMARY KEY (Id),
    INDEX SIL (SIL_Id, AsCatId)
  )
  
  CREATE TABLE products (
    Id int(11) NOT NULL AUTO_INCREMENT,
    CatUrlId int(11) NOT NULL,
    Href varchar(2048) NOT NULL,
    SiteIdentity varchar(2048) NOT NULL,
    Price decimal(12, 2) NOT NULL,
    IsAvailable bit(1) NOT NULL,
    ClientCode varchar(256) NOT NULL,
    PRIMARY KEY (Id),
    INDEX CatUrl (CatUrlId)
  )
  </code></pre>
  
  <p>And I have pretty simple query:</p>
  
  <pre><code>SELECT cu.Href, COUNT(p.CatUrlId) FROM cat_urls cu
         JOIN products p ON p.CatUrlId=cu.Id
         WHERE sil_id=4601038
  GROUP by cu.Id
  </code></pre>
  
  <p>EXPLAIN says:</p>
  
  <pre><code>id  select_type table   type    possible_keys   key     key_len ref                     rows    Extra
  1   SIMPLE      cu      ref     PRIMARY,SIL     SIL     4       const                   303     Using where; Using temporary; Using filesort
  1   SIMPLE      p       ref     CatUrl          CatUrl  4       blue_collar_logs.cu.Id  6       Using index
  </code></pre>
  
  <p>Please tell me is there any way to fix "Using where; Using temporary; Using filesort" and improve perfomance of this query?</p>