[rt-users] Performance on PostgreSQL

Vivek Khera vivek at khera.org
Sat Oct 14 07:53:44 EDT 2006


On Oct 13, 2006, at 6:48 PM, Joby Walker wrote:

> OIDs were used to get the id of the last insert.  The was abandoned  
> because of pgsql 8.1, but it was a horrible way to get the last id  
> anyway.  Current versions of SB insert the row and then get the  
> current value of the sequence associated with that table.  This is  
> much faster and *should* be safe.

Does it actually query the sequence or does it just pull the last  
insert id from the connection's return status?  if the former, then  
it is not multi-thread safe, if the latter then it is faster than  
your method of pulling a sequence then doing insert (one trip to DB  
vs. two).

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 2530 bytes
Desc: not available
URL: <http://lists.bestpractical.com/pipermail/rt-users/attachments/20061014/0a2325b5/attachment.bin>


More information about the rt-users mailing list