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 #