move geo within query into postres and improve makes filtering in it