improve autopick query performance