Added index on profile_id for measurements table, also simplified tPostg...

...resqlRow in the "Delete data from deleted files subjob"