title: How to tell MySQL to use more indexes
body: <p>I'm having a problem with a MySQL query which is too slow because the indexing doesn't work properly in my humble opinion.</p>
  
  <p>I have a table which contains 7 indexables fields and 3 data blobs.</p>
  
  <pre><code>CREATE TABLE IF NOT EXISTS `superstrat` (
    `idStrategy` int(11) NOT NULL AUTO_INCREMENT,
    `strategy_date` datetime NOT NULL,
    `strategy_type` int(11) NOT NULL,
    `strategy_supertype` int(11) NOT NULL,
    `strategy_codes` varchar(40) NOT NULL,
    `strategy_vols` blob NOT NULL,
    `strategy_prices` blob NOT NULL,
    `strategy_hedge` blob NOT NULL,
    `strategy_neutrality` int(11) NOT NULL,
    `strategy_valuation_model` int(11) NOT NULL,
    `strategy_source` int(11) NOT NULL,
    PRIMARY KEY (`idStrategy`),
    UNIQUE KEY `strategy_date` (`strategy_date`,`strategy_type`,`strategy_supertype`,`strategy_codes`,`strategy_neutrality`,`strategy_valuation_model`,`strategy_source`),
    KEY `strategy_date_2` (`strategy_date`),
    KEY `strategy_type` (`strategy_type`),
    KEY `strategy_supertype` (`strategy_supertype`),
    KEY `strategy_codes` (`strategy_codes`),
    KEY `strategy_neutrality` (`strategy_neutrality`),
    KEY `strategy_valuation_model` (`strategy_valuation_model`),
    KEY `strategy_source` (`strategy_source`)
  ) ENGINE=MyISAM  DEFAULT CHARSET=latin1 AUTO_INCREMENT=888605 ;
  </code></pre>
  
  <p>I do this query but it is too slow</p>
  
  <pre><code>SELECT * FROM test_ter.superstrat WHERE strategy_date &gt;= '2004-01-01' AND strategy_type='0'
  AND strategy_supertype = '0' AND strategy_valuation_model='6'
  AND strategy_source ='0' AND strategy_codes='10;' AND strategy_neutrality='2' LIMIT 0,5000;
  </code></pre>
  
  <p>The reason is it does an index_merge Query on only two indexes : strategy_type,strategy_codes :</p>
  
  <pre><code>1   SIMPLE  superstrat  index_merge strategy_date,strategy_date_2,strategy_type,strategy_supertype,strategy_codes,strategy_neutrality,strategy_valuation_model,strategy_source  strategy_type,strategy_codes    4,42        6258    Using intersect(strategy_type,strategy_codes); Using where
  </code></pre>
  
  <p>How can I force to index_merge on other fields, here it will extract 6258 rows instead of 1.5k, when my database is full it will take 60 seconds to extract 50000 rows but I'm quite sure it can be reduced to the target 1.5k, I just don't know how. USE INDEX and FORCE INDEX doesn't seem to work.</p>