title: MySQL Left join 1 result for very big DataBase
body: <p>I have a big database of movies and I want to search movies by years and genres.</p>
  
  <p>I have 3 table to deal with:</p>
  
  <pre><code>1. movies (Key TITLE_ID)
  2. movie2genre (TITLE_ID + GENRE_ID)
  3. genre (Key GENRE_ID)
  </code></pre>
  
  <p><strong>movies:</strong></p>
  
  <pre><code>+----------+---------------+------+
  | TITLE_ID |     TITLE     | YEAR |
  +----------+---------------+------+
  |  10001   | Matrix        | 1999 |
  |  10002   | Walk on Water | 2004 |
  +----------+---------------+------+
  </code></pre>
  
  <p><strong>movie2genre:</strong></p>
  
  <pre><code>+----------+----------+
  | TITLE_ID | GENRE_ID |
  +----------+----------+
  |  10001   |    1     |
  |  10001   |    2     |
  |  10002   |    2     |
  |  10002   |    4     |
  |  10001   |    3     |
  +----------+----------+
  </code></pre>
  
  <p><strong>genre:</strong></p>
  
  <pre><code>+----------+-----------+
  | GENRE_ID | GENRE_TXT |
  +----------+-----------+
  |    1     | Action    |
  |    2     | Adventure |
  |    3     | Thriller  |
  |    4     | Fantasy   |
  +----------+-----------+
  </code></pre>
  
  <p>A user sends a request for year 1999, genre Adventure or Thriller.</p>
  
  <p>How can I find all movies in 1 optimized query?</p>
  
  <p><strong>Result should be:</strong></p>
  
  <pre><code>+----------+--------+------+-----------+
  | TITLE_ID | TITLE  | YEAR | GENRE_TXT |
  +----------+--------+------+-----------+
  |  10001   | Matrix | 1999 |  Action   |
  +----------+--------+------+-----------+
  </code></pre>
  
  <p>I don't care which genre gets selected, only that this movie as 1 of genres user ask for.</p>