| From: | rajan <vgmonnet(at)gmail(dot)com> |
|---|---|
| To: | pgsql-general(at)postgresql(dot)org |
| Subject: | Re: Unable to understand index only scan as it is not happening for one table while it happens for other |
| Date: | 2017-06-27 12:49:41 |
| Message-ID: | 1498567781255-5968844.post@n3.nabble.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | 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.
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Adrian Klaver | 2017-06-27 13:08:45 | Re: Accessing DB2 tables from postgresql |
| Previous Message | Chris Travers | 2017-06-27 12:34:10 | Re: Unable to understand index only scan as it is not happening for one table while it happens for other |