table copy qeustion
Posted in 2016
Topics: High Availability & Replication
I have one qeustion.
I have two tables , A and B.
create table A (c1 int,c2 int);
create table B (c1 int,c2 int, id int);B has additional column named id, I set it's value from a sequence object.
the customer requirement is copy the first 30M rows from A to B.
could I use ER to do it in the same instance?
previously table B is raw table. it take 6 minutes.
what the quickest method to do it with standard table in HDR/RSS environment ?
thanks for your time
ER will not work between tables/databases in the same server, no.
Fastest? Try my dbcopy utility. Tends to be faster than insert into ...
select from and doesn't suffer from locking or log filling problems as it
commits every N rows (configurable - default 10,000). For this you would
specify a select statement on the command line that includes selecting the
two columns from A plus a sequence making B the target table and A the
source table.
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 Mon, Apr 11, 2016 at 8:11 PM, CHUAN LU <luchuan@cn.ibm.com> wrote:
> I have one qeustion.
>
> I have two tables , A and B.
> create table A (c1 int,c2 int);>
> create table B (c1 int,c2 int, id int);> B has additional column named id, I set it's value from a sequence object.
>
> the customer requirement is copy the first 30M rows from A to B.
> could I use ER to do it in the same instance?
>
> previously table B is raw table. it take 6 minutes.
>
> what the quickest method to do it with standard table in HDR/RSS
> environment ?
> thanks for your time
>
>
>
>
*******************************************************************************
> Forum Note: Use "Reply" to post a response in the discussion forum.
>
>
--001a113eb9b245622e05303ebc39