12 Dec
2005
12 Dec
'05
10:35 p.m.
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 reasons. Cheers, Gerhard