Add some more db indexes to assist with query performance

Fixes #4338