My question is:
What index(es) should I create ? I have 10 columns, where four of them will be used as filter (where - equality and inequality) and field for groupby.
It should be four separate index, as:
<constructor-arg value="A"/> <constructor-arg value="B"/> <constructor-arg value="C"/> <constructor-arg value="D"/> or group index:
<constructor-arg> <list> <value>A</value> <value>B</value> <value>C</value> <value>D/value>
Please refer to  and other sections of 'SQL queries' page for some information about this. Most likely, in your case you will need to create individual indexes for all field that can be used in WHERE clause. Whether or not you need group indexes, depend on subset sizings after indexes are applied and on particular queries you're going to execute. You should run tests and use EXPLAIN to check indexes are used.