title: Using Indexes in mysql do not improve query time
body: <p>i have this sql query:</p>
  
  <pre><code>SELECT Frage_ID 
  FROM Session_Fragen WHERE 
  (
      Userantwort1 = 0 
      AND Userantwort2 = 0 
      AND Userantwort3 = 0 
      AND Userantwort4 = 0 
      AND Userantwort5 = 0
  ) AND Session_ID = 17898 
  ORDER BY Sessionfrage_ID ASC LIMIT 1;
  </code></pre>
  
  <p>In the beginning this query run very slow.
  I added index to improve the speed.
  Bevor using indexes i scanned approx. 500.000 rows ...
  After using indexes i reduced the rows to approx. 550 (depends on results)
  But the query still takes more than 2 sec. to run.</p>
  
  <p>I hope anybody has any improvementtips for me...</p>
  
  <p>tanks a lot!</p>
  
  <hr>
  
  <p>SQL EXPLAIN:</p>
  
  <pre><code>id  select_type     table   type    possible_keys   key     key_len     ref     rows    Extra
  1   SIMPLE  Session_Fragen  index   Session_Fragen_big_index_2,Session_Fragen_big_inde...   PRIMARY     8   NULL    535     Using where
  </code></pre>
  
  <hr>
  
  <p>SHOW INDEXES:</p>
  
  <pre><code>Session_Fragen  0   PRIMARY     1   Sessionfrage_ID     A   626229  NULL    NULL        BTREE   
  Session_Fragen  1   Frage_ID    1   Frage_ID    A   3479    NULL    NULL        BTREE   
  Session_Fragen  1   Session_Fragen_big_index_2  1   Userantwort1    A   2   NULL    NULL        BTREE   
  Session_Fragen  1   Session_Fragen_big_index_2  2   Userantwort2    A   3   NULL    NULL        BTREE   
  Session_Fragen  1   Session_Fragen_big_index_2  3   Userantwort3    A   5   NULL    NULL        BTREE   
  Session_Fragen  1   Session_Fragen_big_index_2  4   Userantwort4    A   7   NULL    NULL        BTREE   
  Session_Fragen  1   Session_Fragen_big_index_2  5   Userantwort5    A   9   NULL    NULL        BTREE   
  Session_Fragen  1   Session_Fragen_big_index    1   Session_ID  A   16057   NULL    NULL        BTREE   
  Session_Fragen  1   Session_Fragen_big_index    2   Frage_ID    A   626229  NULL    NULL        BTREE   
  Session_Fragen  1   Session_Fragen_big_index    3          
  Sessionfrage_ID     A   626229  NULL    NULL        BTREE   
  Session_Fragen  1   Userantwort1    1   Userantwort1    A   2   NULL    NULL        BTREE   
  Session_Fragen  1   Userantwort2    1   Userantwort2    A   2   NULL    NULL        BTREE   
  Session_Fragen  1   Userantwort3    1   Userantwort3    A   2   NULL    NULL        BTREE   
  Session_Fragen  1   Userantwort4    1   Userantwort4    A   2   NULL    NULL        BTREE   
  Session_Fragen  1   Userantwort5    1   Userantwort5    A   2   NULL    NULL        BTREE   
  Session_Fragen  1   Session_ID  1   Session_ID  A   16057   NULL    NULL        BTREE
  </code></pre>
  
  <hr>
  
  <p>TABLE STRUCTURE:</p>
  
  <pre><code>Session_Fragen  CREATE TABLE `Session_Fragen` (
   `Sessionfrage_ID` bigint(20) NOT NULL AUTO_INCREMENT,
   `User_ID` int(7) NOT NULL,
   `SF_Timestamp` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
   `Session_ID` int(11) NOT NULL,
   `Frage_ID` int(11) NOT NULL,
   `Userantwort1` tinyint(1) NOT NULL DEFAULT '0',
   `Userantwort2` tinyint(1) NOT NULL DEFAULT '0',
   `Userantwort3` tinyint(1) NOT NULL DEFAULT '0',
   `Userantwort4` tinyint(1) NOT NULL DEFAULT '0',
   `Userantwort5` tinyint(1) NOT NULL DEFAULT '0',
   PRIMARY KEY (`Sessionfrage_ID`),
   KEY `Frage_ID` (`Frage_ID`),
   KEY `Session_Fragen_big_index_2`         (`Userantwort1`,`Userantwort2`,`Userantwort3`,`Userantwort4`,`Userantwort5`),
   KEY `Session_Fragen_big_index` (`Session_ID`,`Frage_ID`,`Sessionfrage_ID`),
   KEY `Userantwort1` (`Userantwort1`),
   KEY `Userantwort2` (`Userantwort2`),
   KEY `Userantwort3` (`Userantwort3`),
   KEY `Userantwort4` (`Userantwort4`),
   KEY `Userantwort5` (`Userantwort5`),
   KEY `Session_ID` (`Session_ID`)
  ) ENGINE=MyISAM AUTO_INCREMENT=862095 DEFAULT CHARSET=utf8
  </code></pre>