Usenet comp.sys.dec (1990-2013)
 help / color / mirror / Atom feed
From: lastovica@hotrdb.enet.dec.com (Norm Lastovica)
Subject: Re: Generating unique numbers, etc.
Date: 1995/12/14	[thread overview]
Message-ID: <4aqd8b$bv8@nedc.us.oracle.com> (raw)
In-Reply-To: 4aq3kt$nia@cantua.canterbury.ac.nz

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 1454 bytes --]


In article <4aq3kt$nia@cantua.canterbury.ac.nz>, E.Havelaar@Regy.Canterbury.Ac.NZ (Ed Havelaar) writes:

�Suppose I have a program that takes ages to run and keeps a read-only 
�transaction open for its duration (e.g. to perform calculations on all 100000 
�records in a table),  Every now and again, I want to assign an account number.  
�This involves starting a read-write transaction for as short a time as 
�possible.  How can I do this without terminating my hours-long 
�read-only transaction and somehow figuring out where and how to recommence it?

	what version of Rdb are you using?  I'll assume that you are
using some relatively current version (6.1).  

	how are the records in your original readonly transactions selected?
if they are based on some unique, sorted, ascending key, then you could
just keep track of the last key that you processed, perform the read-write
transaction, and then start up at the record with the key greater than your
last key.

	if you are only gonna do a peak of 400 inserts per hour, I'd not 
bother with the lock value block or any of the performance 'enhancers'.  
this is a pretty low insert rate.  the trigger would be a really nice way
to do the counter.  the folk lore of triggers being slow probably isn't
completely accurate, they'll execute at the same speed as any old sql
statement.
	

-- 
the opinions expressed here are my own and hardly ever
reflect those of Oracle Corporation.



  reply	other threads:[~1995-12-14  5:00 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1995-12-11  5:00 Generating unique numbers Ed Havelaar
1995-12-12  5:00 ` Lilian Hobbs
1995-12-14  5:00   ` Albert Godfrind
1995-12-13  5:00 ` Stephen Hoffman
1995-12-14  5:00 ` Generating unique numbers, etc Ed Havelaar
1995-12-14  5:00   ` Norm Lastovica [this message]
1995-12-15  5:00   ` Lilian Hobbs
read-only archive

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox