ER data volume
Posted in 2016
Topics: Triggers, Constraints & Referential Integrity
Hi,
IDS12.10 FC4.
A table mytab is ER full row replicated in Every-Where.
Primary key is tabid.
No trigger defined.
job1,
update mytab set col1=100,col2=150 where tabid=25
job2,
begin work;
update mytab set col1=100 where tabid=25;
update mytab set col2=150 where tabid=25;commit work;
Now create a update trigger for it ( for example purpose only), run job3.
create trigger mytab_trig update of col1 on mytab referencing old as prenew as pos
for each row
(update mytab set col2=150 where tabid = pos.tabid );
job3,
update mytab set col1=100 where tabid=25
Question,
From ER replicated data volume point of view, the three jobs will incur
the same size of data ( should be one full row of mytab in the above cases
) being delivered to other sites, correct ? if not exactly, which one is
preferred or best ? why?
Thanks
Frank
--001a1141576635f9a5053b761b6a
I'm not sure what your question is. Madison Pruet Retired and Loving it On Thursday, September 1, 2016 1:09 PM, FRANK <yunyaoqu@gmail.com> wrote:
To my mind, job1 will always be best because it updates each row in a
single operation rather than two operations.
Art
Art S. Kagel, President and Principal Consultant
ASK Database Management
www.askdbmgt.com
Blog: http://informix-myview.blogspot.com/
Disclaimer: Please keep in mind that my own opinions are my own opinions
and do not reflect on the IIUG, nor any other organization with which I am
associated either explicitly, implicitly, or by inference. Neither do
those opinions reflect those of other individuals affiliated with any
entity with which I am affiliated nor those of the entities themselves.
On Thu, Sep 1, 2016 at 2:08 PM, FRANK <yunyaoqu@gmail.com> wrote:
> Hi,
>
> IDS12.10 FC4.
>
> A table mytab is ER full row replicated in Every-Where.
> Primary key is tabid.
> No trigger defined.
>
> job1,
> update mytab set col1=100,col2=150 where tabid=25>
> job2,
> begin work;
> update mytab set col1=100 where tabid=25;
> update mytab set col2=150 where tabid=25;> commit work;
>
> Now create a update trigger for it ( for example purpose only), run job3.
>
> create trigger mytab_trig update of col1 on mytab referencing old as pre> new as pos
>
> for each row
> (update mytab set col2=150 where tabid = pos.tabid );
>
> job3,
> update mytab set col1=100 where tabid=25>
> Question,
> >From ER replicated data volume point of view, the three jobs will incur
> the same size of data ( should be one full row of mytab in the above cases
> ) being delivered to other sites, correct ? if not exactly, which one is
> preferred or best ? why?
>
> Thanks
> Frank
>
> --001a1141576635f9a5053b761b6a
>
>
> ************************************************************
> *******************
> Forum Note: Use "Reply" to post a response in the discussion forum.
>
>
--089e010d8a2272fb5f053b77fe7b
I assume your question would be:
Which sql produces the lowest data traffic between source and target DB
instance ?
I would say there should not be a big difference, the result in terms of "old
content" > "new content" within the
same transaction is the same, not depending how you manage to set the values.
The trigger is not executed on the target side as you might expect, the whole
replication runs per transaction and plays the
before/after game.
I suspect you want to improve throughput with modified sql on a slow
connection between the servers.
That is not the way. I do not know any way how to modify the traffic between
the servers other than compressing
the stream, but normally the bandwidth requirements for any kind of
replication (HDR maybe more than RSS) is not very
high, in terms of "todays" connections.
Marcus Haarmann
----- Ursprüngliche Mail -----
Von: "FRANK" <yunyaoqu@gmail.com>
An: ids@iiug.org
Gesendet: Donnerstag, 1. September 2016 20:08:55
Betreff: ER data volume [37723]
Hi,
IDS12.10 FC4.
A table mytab is ER full row replicated in Every-Where.
Primary key is tabid.
No trigger defined.
job1,
update mytab set col1=100,col2=150 where tabid=25
job2,
begin work;
update mytab set col1=100 where tabid=25;
update mytab set col2=150 where tabid=25;commit work;
Now create a update trigger for it ( for example purpose only), run job3.
create trigger mytab_trig update of col1 on mytab referencing old as prenew as pos
for each row
(update mytab set col2=150 where tabid = pos.tabid );
job3,
update mytab set col1=100 where tabid=25
Question,
>From ER replicated data volume point of view, the three jobs will incur
the same size of data ( should be one full row of mytab in the above cases
) being delivered to other sites, correct ? if not exactly, which one is
preferred or best ? why?
Thanks
Frank
--001a1141576635f9a5053b761b6a
*******************************************************************************
Forum Note: Use "Reply" to post a response in the discussion forum.
ER will replicate the final after image of the row where tabid = 25 in all
three cases. I agree with Art that the first solution is the best solution
because it will perform all of the updating operations as a single step.
Madison Pruet
Retired and Loving it
On Thursday, September 1, 2016 3:24 PM, Art Kagel <art.kagel@gmail.com> wrote:
To my mind, job1 will always be best because it updates each row in a
single operation rather than two operations.
Art
Art S. Kagel, President and Principal Consultant
ASK Database Management
www.askdbmgt.com
Blog: http://informix-myview.blogspot.com/
Disclaimer: Please keep in mind that my own opinions are my own opinions
and do not reflect on the IIUG, nor any other organization with which I am
associated either explicitly, implicitly, or by inference. Neither do
those opinions reflect those of other individuals affiliated with any
entity with which I am affiliated nor those of the entities themselves.
On Thu, Sep 1, 2016 at 2:08 PM, FRANK <yunyaoqu@gmail.com> wrote:
> Hi,
>
> IDS12.10 FC4.
>
> A table mytab is ER full row replicated in Every-Where.
> Primary key is tabid.
> No trigger defined.
>
> job1,
> update mytab set col1=100,col2=150 where tabid=25>
> job2,
> begin work;
> update mytab set col1=100 where tabid=25;
> update mytab set col2=150 where tabid=25;> commit work;
>
> Now create a update trigger for it ( for example purpose only), run job3.
>
> create trigger mytab_trig update of col1 on mytab referencing old as pre> new as pos
>
> for each row
> (update mytab set col2=150 where tabid = pos.tabid );
>
> job3,
> update mytab set col1=100 where tabid=25>
> Question,
> >From ER replicated data volume point of view, the three jobs will incur
> the same size of data ( should be one full row of mytab in the above cases
> ) being delivered to other sites, correct ? if not exactly, which one is
> preferred or best ? why?
>
> Thanks
> Frank
>
> --001a1141576635f9a5053b761b6a
>
>
> ************************************************************
> *******************
> Forum Note: Use "Reply" to post a response in the discussion forum.
>
>
--089e010d8a2272fb5f053b77fe7b
*******************************************************************************
Forum Note: Use "Reply" to post a response in the discussion forum.