* log the queries from the application
* parse the queries into an AST
* collate the ASTs to form the most common query patterns
* cross-reference existing indexes
* create index recommendations with and without predicates
that worked pretty well, up until you're trying to decide which index type is going to be best.
this is pretty darned neat in comparison. I do hope they open-source it like they did pg_query.