Re: Patch to return last tid

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Arturo Josè Montes Sinning" <mitosys(at)colomsat(dot)net(dot)co>
Cc: pgsql-patches(at)postgresql(dot)org
Subject: Re: Patch to return last tid
Date: 2002-09-15 17:33:52
Message-ID: 29725.1032111232@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-patches

"Arturo =?ISO-8859-1?Q?Jos=E8?= Montes Sinning" <mitosys(at)colomsat(dot)net(dot)co> writes:
> I am talking about select <select-list> from <table> where oid=<oid>
> When the table has thousands records this query is executed by Postgres
> as sequential scan.

Create an index on OID, if you want to use it to find rows quickly...

> The other problems come from insert. We are paying
> an extra cost when insert a row because oid sequence computation.

I've never seen any evidence that generating an OID is a significant
part of the time needed to do an INSERT (and yes, I've done profiling
of such things).

regards, tom lane

In response to

Browse pgsql-patches by date

  From Date Subject
Next Message Neil Conway 2002-09-16 00:37:25 CREATE DOMAIN doc fix
Previous Message Arturo Josè Montes Sinning 2002-09-15 16:54:23 Re: Patch to return last tid