udpating query to speed join of changes_queue

my testing showed an increase in the sql query of a factor of 5 (or more).