Bug 1068752 - Use artinsal SQL queries to speed up data retrieval

Lets DRY this out a bit