tid scan - is it ever used?

Started by murphy popealmost 24 years ago5 messagesgeneral
Jump to latest
#1murphy 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

#2Jan Wieck
JanWieck@Yahoo.com
In reply to: murphy pope (#1)
Re: tid scan - is it ever used?

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 #

#3Fabricio Boppre
fabricio@gprog.com.br
In reply to: murphy pope (#1)
how to remove columns from a table

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

#4Neil Conway
neilc@samurai.com
In reply to: Fabricio Boppre (#3)
Re: how to remove columns from a table

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

#5Vivek Khera
khera@kcilink.com
In reply to: Neil Conway (#4)
Re: how to remove columns from a table

"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/