SQLite Forum

What indexes help Window Functions
Login
In fact, the most efficient index for the outer query would be a t(b,a) covering index so that access to the underlying table is not required.

If there were both an index on t(b,a) and t(a,c) then the above query could be solved by scanning/searching the indexes only and no access to the underlying table would be required at all.