View Single Post

   
  #4 (permalink)  
Old 02-27-2008, 09:17 AM
Serge Rielau
 
Posts: n/a
Default Re: Session tables in triggers. Is it planned?

4.spam@mail.ru wrote:
> Actually, the problem is that I want to copy content of transition
> table into session table for futher processing. The goal is
> performance.
> How can I do this?
> Only by calling some procedure in cycle for each row (bad performance i
> think for 1 million row insert)?
> Is there another way?

You could privatize a persistent table. E.g. use GENERATE_UNIQUE() or a
SEQUENCE to get a ticket. At the end of the trigger DELETE.
Since the trigger is atomic you don't even need to worry about cleanup.

Cheers
Serge

--
Serge Rielau
DB2 Solutions Development
IBM Toronto Lab

IOD Conference
http://www.ibm.com/software/data/ond...ness/conf2006/
Reply With Quote