On Jan 2, 2014, at 2:17 PM, Brice André wrote:
> Hello everyone,
>
> I have a question concerning index : suppose I have a table with fields 'a' and 'b' and that all requests perform WHERE clauses on 'a' field, and some requests also perform WHERE clauses on 'b' fields. What is the best approach for indexing strategy:
> One index on 'a' and one on 'b'
> One index on both columns 'a' and 'b'
> A combination of both solutions ?
Could you clarify your question a bit? Are you saying your queries are predominantly
SELECT ... FROM table WHERE a = ?
With some queries that are
SELECT ... FROM table WHERE a = ? AND b = ?
Thanks,
Jonathan