How gather statistics improves performance of a query?