faster and simpler query graph