title: optimizing this query - which index or changes should i do?
body: <p>Quite a simple question. But i'm a little bit lost when it come to sql optimization and index, i'm learning.</p>
  
  <p>Query</p>
  
  <pre><code>SELECT A.*, count(A.ID) as count 
  FROM tableB B 
  JOIN tableA A ON A.ID = B.ID 
  WHERE B.otherID=xx and B.value='test' and B.languageID=3
  </code></pre>
  
  <p>Table A</p>
  
  <pre><code>CREATE TABLE `tableA` (
    `ID` int(11) NOT NULL AUTO_INCREMENT,
    `info1` varchar(64) NOT NULL default '',
    `info2` varchar(64) NOT NULL default '',
    PRIMARY KEY  (`ID`)
  ) TYPE=MyISAM
  </code></pre>
  
  <p>Table B</p>
  
  <pre><code>CREATE TABLE `tableB` (
    `ID` int(11) NOT NULL default '0',
    `otherID` int(11) NOT NULL default '0',
    `value` varchar(64) NOT NULL default '',
    `languageID` int(11) NOT NULL default '0',
    PRIMARY KEY  (`ID`,`otherID`,`languageID`)
  ) TYPE=MyISAM
  </code></pre>
  
  <p>So the query is quite simple, i'm looking for the fields with a specific id and value in the table B, and i'm doing a join on table A because i need some infos which are in there.
  I guess the query itself can't be optimized, but maybe i can speed up thing if i create an index, an index on (B.otherID,B.value) maybe ?</p>
  
  <p>Thanks for you lights!</p>