Improved IndexAccelerator SQL to use proper JOINs, thanks to Moritz Lenz.