tid scan - is it ever used?

Поиск
Список
Период
Сортировка
Искать

tid scan - is it ever used?

От:
"murphy pope" <pope_murphy@hotmail.com>
Дата:
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

Re: tid scan - is it ever used?

От:
Jan Wieck <janwieck@yahoo.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 .


Jan

--

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


how to remove columns from a table

От:
Fabricio Boppre <fabricio@gprog.com.br>
Дата:
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

Re: how to remove columns from a table

От:
Neil Conway <nconway@klamath.dyndns.org>
Дата:
On Thu, 6 Jun 2002 15:39:11 -0300
"Fabricio Boppre"  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 
PGP Key ID: DB3C29FC

Re: how to remove columns from a table

От:
Vivek Khera <khera@kcilink.com>
Дата:
>>>>> "NC" == Neil Conway  writes:

NC> On Thu, 6 Jun 2002 15:39:11 -0300
NC> "Fabricio Boppre"  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/
FAQ