From: | Bo Lorentsen <bl(at)netgroup(dot)dk> |
---|---|
To: | "pgsql-general postgresql(dot)org" <pgsql-general(at)postgresql(dot)org> |
Subject: | OID Usage |
Date: | 2005-01-14 07:03:24 |
Message-ID: | 41E76EBC.10004@netgroup.dk |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Hi ...
I am using postgresql 7.4 on a pontencial large DB system, and I am
quite happy of the performance of this database, as for now. Only one
thing worrys me, and I like to get some pease to my mind about this.
I use normal tabel ID (SERIAL and BIGSERIAL) all over the place for FK
constaints, but I use OID in one special situation. When I insert a
single row into a table, I like my low level code to be kompatible with
mysql ( mysql_insert_id ), and fetch the row that I just inserted. This
I do by using the PGoidValue function, and then select the row by the
oid. This works quite nice .... but when a table get large, it become a
big search (seq scan) so I have added an index on oid's on the table
where I use this trick, and this have helper :-)
This is the ONLY use I have for the oid's, and I don't use them for
anything else !
Now, are there any danger in using this method ? And if there is, how
can I do this trick without knowing the layout of the table I insert into ?
Regards
/BL
From | Date | Subject | |
---|---|---|---|
Next Message | Michael Glaesemann | 2005-01-14 08:16:13 | Re: OID Usage |
Previous Message | Greg Stark | 2005-01-14 04:41:32 | Re: Version Control Software for Database Objects |