Welcome to dbFreaks.com!
FAQFAQ      ProfileProfile    Private MessagesPrivate Messages   Log inLog in

Updating Partition Key with Before Trigger

 
   Database Help (Home) -> DB2 RSS
Next:  session.gc_maxlifetime  
Author Message
jbaker

External


Since: Dec 08, 2004
Posts: 2



(Msg. 1) Posted: Thu Feb 10, 2005 4:27 pm
Post subject: Updating Partition Key with Before Trigger
Archived from groups: comp>databases>ibm-db2 (more info?)

We are looking at the possibility of using a before trigger to provide
the value for the partitioning key of a table. It strikes me as
something that would not work, but I have been surprised before. Does
anyone know whether this is allowed with DB2 8.2 or not?

thanks

Jack

 >> Stay informed about: Updating Partition Key with Before Trigger 
Back to top
Login to vote
mirof007

External


Since: Feb 10, 2005
Posts: 1



(Msg. 2) Posted: Thu Feb 10, 2005 5:14 pm
Post subject: Re: Updating Partition Key with Before Trigger [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Why not simply try it? Wink Yes, this is allowed both in before and in
after triggers. Has been since DB2 UDB for L/U/W Version 8.1.

Regards,
Miro

 >> Stay informed about: Updating Partition Key with Before Trigger 
Back to top
Login to vote
jbaker

External


Since: Dec 08, 2004
Posts: 2



(Msg. 3) Posted: Fri Feb 11, 2005 11:42 am
Post subject: Re: Updating Partition Key with Before Trigger [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Well, in case anyone is interested, I did try it. It does seem to
work, I am surprised. I would have expected the before trigger to be
executed after the insert was routed to a partition. Obviously, that
is not exactly what it happening.

Jack

mirof007 DeleteThis @gmail.com wrote:
 > Why not simply try it? Wink Yes, this is allowed both in before and in
 > after triggers. Has been since DB2 UDB for L/U/W Version 8.1.
 >
 > Regards,
 > Miro<!-- ~MESSAGE_AFTER~ -->
 >> Stay informed about: Updating Partition Key with Before Trigger 
Back to top
Login to vote
Mark A2

External


Since: Mar 13, 2004
Posts: 183



(Msg. 4) Posted: Fri Feb 11, 2005 9:04 pm
Post subject: Re: Updating Partition Key with Before Trigger [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

<jbaker DeleteThis @marketron.com> wrote in message
news:1108147376.688951.106940@l41g2000cwc.googlegroups.com...
 > Well, in case anyone is interested, I did try it. It does seem to
 > work, I am surprised. I would have expected the before trigger to be
 > executed after the insert was routed to a partition. Obviously, that
 > is not exactly what it happening.
 >
 > Jack
 >
Somehow I am thinking this is not very efficient since the partition that
gets the row, then has to then send it to another partition. There are
better ways to force data to be loaded on a specific partition, unless
performance is not at all an issue (in which case I wonder why you are using
DPF).<!-- ~MESSAGE_AFTER~ -->
 >> Stay informed about: Updating Partition Key with Before Trigger 
Back to top
Login to vote
Display posts from previous:   
   Database Help (Home) -> DB2 All times are: Pacific Time (US & Canada) (change)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You can edit your posts in this forum
You can delete your posts in this forum
You can vote in polls in this forum



[ Contact us | Terms of Service/Privacy Policy ]