fixed performance query double hash