Optimized reverse image search query by moving image comparison into innter query without joins. Much, much faster