[GENERAL] Re: Unable to understand index only scan as it is not happening forone table while it happens for other - Mailing list pgsql-general

From rajan
Subject [GENERAL] Re: Unable to understand index only scan as it is not happening forone table while it happens for other
Date
Msg-id 1498567781255-5968844.post@n3.nabble.com
Whole thread Raw
In response to [GENERAL] Unable to understand index only scan as it is not happening for onetable while it happens for other  (rajan <vgmonnet@gmail.com>)
Responses Re: [GENERAL] Re: Unable to understand index only scan as it is nothappening for one table while it happens for other
List pgsql-general
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

---------------------------------------------------------------------------------------------------------------------------------------------------
 Index Only Scan using mm_pkey on public.mm  (cost=0.27..22.47 rows=354
width=8) (actual time=0.023..0.079 rows=354 loops=1)
   Output: uid
   Index Cond: (mm.uid > 100)
   Heap Fetches: 0
 Planning time: 0.096 ms
 Execution time: 0.131 ms
(6 rows)



-----
--
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-tp5968835p5968844.html
Sent from the PostgreSQL - general mailing list archive at Nabble.com.


pgsql-general by date:

Previous
From: Chris Travers
Date:
Subject: Re: [GENERAL] Unable to understand index only scan as it is nothappening for one table while it happens for other
Next
From: Adrian Klaver
Date:
Subject: Re: [GENERAL] Accessing DB2 tables from postgresql