thanks for the explanation, Gary.
-
--
Thanks,
Rajan.
--
View this message in context:
http://www.postgresql-archive.org/Unable-to-understand-index-only-scan-as-it-is-not-happening-for-one-table-while-it-happens-for-other-tp5968835p5968976.html
Sent from the PostgreSQL - general mailing lis
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
Thanks.
Now I did the same query, but it is going for *index-only scan* only after I
put *limit*
localdb=# explain analyse verbose select uid from mm where uid>100 order by
uid;
QUERY PLAN
-
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
> ---
Ah! Got it. Thanks. One more question,
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