Introspect on DB to determine indexes for M-R

Previously, we trusted our metadata
Merge pull request #166 from cndreisbach/true-indexes

Introspect on DB to determine indexes for M-R