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