No, you can't rely on such behavior. For example, it will be broken in you'll add a smaller index with symbol and side columns.
I missed, however, the WHERE clause in your query. With such clause when only one value is allowed in symbol column and only one value is allowed in side column your index on (symbol, side, orderingpx, serial) can be used for ORDER BY orderingpx, serial, but query execution planner of H2 is not that smart, you need to rewrite your ORDER BY clause as ORDER BY symbol, side, orderingpx, serial to help it. The related issue is here: https://github.com/h2database/h2database/issues/210 -- You received this message because you are subscribed to the Google Groups "H2 Database" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/h2-database/8d55d94d-5ca2-4173-beae-ab82b60c2ad1o%40googlegroups.com.
