Next numbers for relationships in 6.5.2


I was wondering why the RXRELATEDCONTENT keyname in the NEXTNR table tracks ahead of new RIDs in the PSX_OBJECTRELATIONSHIP table. In other words, when you create a new relationship (e.g. a content item in a folder), it is issued with a new RID that is a few integers below the number in NEXTNR. Repeat the process a few times and, as the RID of new rows in PSX_OBJECTRELATIONSHIP approaches the number in NEXTNR, it is bumped up by ten.

Just curious what the reason is for this.



The reason is pretty simple: there’s a process inside the server that “caches” nextnumber rows. As you can see, they are allocated 10 at a time.

The purpose of this code is to cut down on the number of database row locks required because of updates to the table.


Thanks for the info.