From: | Enrico Pirozzi <sscotty71(at)gmail(dot)com> |
---|---|
To: | Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com> |
Cc: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: Index scan vs indexonly scan method |
Date: | 2014-10-22 16:18:41 |
Message-ID: | 5447D8E1.6000905@gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
> The background on index-only scans:
>
> https://wiki.postgresql.org/wiki/What%27s_new_in_PostgreSQL_9.2#Index-only_scans
>
>
> In either case(index, index-only) the index has to be scanned. The
> difference is where the data is pulled from. In the index-only scan
> the query still needs to consult the visibility map to determine
> whether the tuple pointed to by the index entry is visible. I would
> say that in the limit 1 case the planner determines it is just as easy
> to check and pull the data from the actual tuple as to to check the
> visibility map. In the limit 100 case it becomes more cost effective
> to use the visibility map and pull data directly from the index data.
>
>
Thank you for your answer
Enrico
--
That's one small step for man; one giant leap for mankind
Enrico Pirozzi
Tel. +39 0861 1855771 - Mob.+39 328 4164437 - Fax +39 0861 1850310
http://www.pgtraining.com <http://www.pgtraining.com-> -
info(at)pgtraining(dot)com
www.enricopirozzi.info - info(at)enricopirozzi(dot)info
PEC: enrico(dot)pirozzi(at)pec(dot)it
Skype sscotty71 - Gtalk sscotty71(at)gmail(dot)com
From | Date | Subject | |
---|---|---|---|
Next Message | Ilya Ashchepkov | 2014-10-22 16:38:31 | Re: Function runtime increases after 5 calls in the same session. |
Previous Message | Adrian Klaver | 2014-10-22 15:37:47 | Re: Index scan vs indexonly scan method |