The order of columns in composite indexes
<p>I have a table like this:</p>

<pre><code>// posts
+----+-------------+-----------------------------+
| id |    title    |             body            |
+----+-------------+-----------------------------+
| 1  | First Post  | The content of first post   |
| 2  | Second Post | The content of second post  |
+----+-------------+-----------------------------+
</code></pre>

<p>Now I need to search into both <code>title</code> and <code>body</code> columns. Noted that I want to search into those two columns as <em>full-text</em>.</p>

<p><strong>My question:</strong> Do I need to make either one composite index on those two columns or two single indexes on them separately?</p>

<p>In other word, which one?</p>

<ul>
<li>index: <code>tb(title,body)</code> | query: <code>WHERE MATCH(title,body) AGAINST(?,?)</code></li>
<li>index: <code>t(title), b(body)</code> | query: <code>WHERE MATCH(title) AGAINST(?) OR MATCH(body) AGAINST(?)</code></li>
</ul>

<p>Honestly I cannot understand the different of these ^.</p>

<hr>

<p>Also yeah I know, the title of my question isn't matched with the content.</p>