Re: tid scan - is it ever used?

Поиск
Список
Период
Сортировка
От Jan Wieck
Тема Re: tid scan - is it ever used?
Дата
Msg-id 200206031717.g53HHLs03112@saturn.janwieck.net
обсуждение исходный текст
Ответ на tid scan - is it ever used?  ("murphy pope" <pope_murphy@hotmail.com>)
Список pgsql-general
murphy pope wrote:
> I realize this might be "hackers" question, but I was wondering if anyone
> has ever seen a "tid scan" in a query plan?
>
> I think a tid scan would only be used if you did something like:
>
>   select ctid from mytable;

    AFAIK  the  tidscan  is used when one specifies "WHERE ctid =
    ...".

> are there any other uses for a tid scan?

    Currently it is the fastest possible access to a single  row.
    So  an application that selects data and wants to update rows
    is optimized for PostgreSQL if it knows about that  fact  and
    qualifies the updates by ctid.

    I thought about getting ctid as a junk attribute when doing a
    SELECT ... FOR UPDATE in a cursor and using that  information
    in UPDATE ... WHERE CURRENT OF <cursorname>.


Jan

--

#======================================================================#
# It's easier to get forgiveness for being wrong than for being right. #
# Let's break this rule - forgive me.                                  #
#================================================== JanWieck@Yahoo.com #



В списке pgsql-general по дате отправления:

Предыдущее
От: Curt Sampson
Дата:
Сообщение: View vs. Statement Query Plan
Следующее
От: Keary Suska
Дата:
Сообщение: Re: [PHP] Problems while compiling php_4-2.1 with PostgreSQL