Use a raw SQL query to efficiently populate this view.

The old version was taking > 3000sec and 3 GB of memory, so this will
get us by in the meanwhile.