I've been doing some work on the SQL query optimizer quietly in every release of the product.

The optimizer already handles partial key index restriction and composite keys. The optimizer will also use filtered indexes if they match the query.

In v1.4.1 composite keys that may have some functions in them that convert the data type of a column are also taken into consideration.

Here are a few screenshots to show you the sort of performance I'm now seeing on > 1m record tables.

Name:  Screen Shot 2015-03-18 at 2.11.01 PM.jpg
Views: 283
Size:  94.7 KB

Name:  Screen Shot 2015-03-18 at 2.12.54 PM.jpg
Views: 279
Size:  66.9 KB