Обсуждение: tid scan - is it ever used?
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; are there any other uses for a tid scan? -- Thanks, Murphy _________________________________________________________________ Join the world�s largest e-mail service with MSN Hotmail. http://www.hotmail.com
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 #
hi, i am trying to remove a column from a table, but i have not been successful yet... can anyone help me? sorry if it is too simple, but i'm a new user and there was nothing to help me in the guides i have read. thanks, Fabricio
On Thu, 6 Jun 2002 15:39:11 -0300 "Fabricio Boppre" <fabricio@gprog.com.br> wrote: > i am trying to remove a column from a table, but i have not been successful > yet... http://www.ca.postgresql.org/docs/faq-english.html#4.4 Cheers, Neil -- Neil Conway <neilconway@rogers.com> PGP Key ID: DB3C29FC
>>>>> "NC" == Neil Conway <nconway@klamath.dyndns.org> writes: NC> On Thu, 6 Jun 2002 15:39:11 -0300 NC> "Fabricio Boppre" <fabricio@gprog.com.br> wrote: >> i am trying to remove a column from a table, but i have not been successful >> yet... NC> http://www.ca.postgresql.org/docs/faq-english.html#4.4 Which is useless if you have foreign keys referencing your table. -- =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= Vivek Khera, Ph.D. Khera Communications, Inc. Internet: khera@kciLink.com Rockville, MD +1-240-453-8497 AIM: vivekkhera Y!: vivek_khera http://www.khera.org/~vivek/