Re: [GENERAL] Re: Unable to understand index only scan as it is not happening for one table while it happens for other

2017-06-27 Thread Gary Evans
Hi Rajan, I would say that the optimiser has calculated that it would be quicker to sequentially read thought the table to get the 354 rows returned without the limit. By introducing the limit, it is much faster to pick out the first 10 rows using the index. Using an index is usually only quicke

Re: [GENERAL] Re: Unable to understand index only scan as it is not happening for one table while it happens for other

2017-06-27 Thread Albe Laurenz
rajan wrote: > why the index-only scan *works only* with an *order by*? > localdb=# explain analyse verbose select uid from mm where uid>100 *order > by* uid; > QUERY > PLAN > ---