[development] auto_increment

Gerhard Killesreiter gerhard at killesreiter.de
Mon Dec 12 21:35:11 UTC 2005

Nicolas Tostin wrote:

>>>Btw, due to the chaotic use of sequences table (sometime it's used,
>>>sometimes not)
>>When not?
>I don't have an exact list, but I remember having found some examples, so I
>understood that it was better handling them by DB trigger (for Oracle schema
>I mean) than doing nothing .

The general scheme is that we use locking if we want to know the ID in 
advance or if we need it afterwards for further processing (example: 
node iD). If we only need to make sure that we get a unique ID and don't 
care about its value we use auto_increment (examples: accesslog, 
watchdog). Using LOCK to get the IDs would be a bad idea for performance 


More information about the development mailing list