I want to create some index on a specific table to help boost performance for data retrieval. The data would be searched on field1 and also on field2:
1) Where field1 = 1
2) Where field2 > 300
3) Where field1 = 20 and field2 > 400
Also, the two fields would be included in the order by clause (e.g. "order by field1, field2").
Should creating an index on field1 and a separate index on field2 is enough to take care everything stated above? Or do I also have to create a combined index of (field1, field2) besides creating a separate index for field1 and field2? What is the best approach for creating index in the above scenario?