[Firebird-net-provider] Bulk copy

2007-07-20 Thread Eduardo Gamboa
Hi Guys,

Does anybody know how to make a bulk copy of a table from one database to 
another using Fb Net provider?

I am trying to achieve this goal using something like this:

FbDataAdapter sourceDA = new FbDataAdapter("SELECT * FROM TEST_TABLE", 
fbSourceConn);
DataSet ds = new DataSet();
sourceDA.Fill(ds, "TEST_TABLE");
FbDataAdapter targetDA = new FbDataAdapter("SELECT * FROM TEST_TABLE", 
fbTargetConn);
FbCommandBuilder fbCb = new FbCommandBuilder(targetDA);
targetDA.InsertCommand = fbCb.GetInsertCommand();
foreach(DataRow dr in ds.Tables["TEST_TABLE"].Rows)
{
/// Change the state of the row
dr.SetAdded();
}
targetDA.Update(ds, "TEST_TABLE");

The problem with this approach is that FbDataAdapter.Update() is too slow. 
It takes almost 1 hour to copy aprox 500.000 rows.

Is there a faster way to do this? or am I missing something?

Thanks in advance
Eduardo 


-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
Firebird-net-provider mailing list
Firebird-net-provider@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/firebird-net-provider


Re: [Firebird-net-provider] Bulk copy

2007-07-20 Thread Carlos Guzmán Álvarez
Hello:

> The problem with this approach is that FbDataAdapter.Update() is too slow. 
> It takes almost 1 hour to copy aprox 500.000 rows.
> 
> Is there a faster way to do this? or am I missing something?

Can you try to wrap the inserts inside a single ( or several ones ) 
transaction ??

-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
Firebird-net-provider mailing list
Firebird-net-provider@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/firebird-net-provider


Re: [Firebird-net-provider] Bulk copy

2007-07-20 Thread Jiri Cincura
On 7/20/07, Eduardo Gamboa <[EMAIL PROTECTED]> wrote:
> Is there a faster way to do this? or am I missing something?

With .net provider? AFAIK QLI (old tool, like isql) can do this as
fast as possible.

BTW I'll try to use DataReader and not filling dataset and pump it
into in one foreach loop.

Using the dataset is some unnecessary overhead.

-- 
Jiri {x2} Cincura (Microsoft Student Partner)
http://blog.vyvojar.cz/jirka/ | http://www.ID3renamer.com

-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
Firebird-net-provider mailing list
Firebird-net-provider@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/firebird-net-provider


Re: [Firebird-net-provider] Bulk copy

2007-07-20 Thread Eduardo Gamboa
Carlos,
Wrapping the process in a single transaction reduced the time to only 4mins.

Thanks,
Eduardo

""Carlos Guzmán Álvarez"" <[EMAIL PROTECTED]> wrote in message 
news:[EMAIL PROTECTED]
> Hello:
>
>> The problem with this approach is that FbDataAdapter.Update() is too 
>> slow.
>> It takes almost 1 hour to copy aprox 500.000 rows.
>>
>> Is there a faster way to do this? or am I missing something?
>
> Can you try to wrap the inserts inside a single ( or several ones )
> transaction ??
>
> -
> This SF.net email is sponsored by: Microsoft
> Defy all challenges. Microsoft(R) Visual Studio 2005.
> http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
> ___
> Firebird-net-provider mailing list
> Firebird-net-provider@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/firebird-net-provider
> 


-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
Firebird-net-provider mailing list
Firebird-net-provider@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/firebird-net-provider


Re: [Firebird-net-provider] Bulk copy

2007-07-20 Thread Eduardo Gamboa
Is there a way to use a single transaction with multiple database 
connection?


""Carlos Guzmán Álvarez"" <[EMAIL PROTECTED]> wrote in message 
news:[EMAIL PROTECTED]
> Hello:
>
>> The problem with this approach is that FbDataAdapter.Update() is too 
>> slow.
>> It takes almost 1 hour to copy aprox 500.000 rows.
>>
>> Is there a faster way to do this? or am I missing something?
>
> Can you try to wrap the inserts inside a single ( or several ones )
> transaction ??
>
> -
> This SF.net email is sponsored by: Microsoft
> Defy all challenges. Microsoft(R) Visual Studio 2005.
> http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
> ___
> Firebird-net-provider mailing list
> Firebird-net-provider@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/firebird-net-provider
> 


-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
Firebird-net-provider mailing list
Firebird-net-provider@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/firebird-net-provider


Re: [Firebird-net-provider] Bulk copy

2007-07-20 Thread Jiri Cincura
On 7/20/07, Eduardo Gamboa <[EMAIL PROTECTED]> wrote:
> Is there a way to use a single transaction with multiple database
> connection?

In Firebird yes. FB has support for 2PC protocol. But with .net
provider you can't use this.

-- 
Jiri {x2} Cincura (Microsoft Student Partner)
http://blog.vyvojar.cz/jirka/ | http://www.ID3renamer.com

-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
Firebird-net-provider mailing list
Firebird-net-provider@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/firebird-net-provider


Re: [Firebird-net-provider] Bulk copy

2007-07-20 Thread Carlos Guzmán Álvarez
Hello:

> Carlos,
> Wrapping the process in a single transaction reduced the time to only 4mins.
> 

Are you using the embedded server or the standalone one ??

-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
Firebird-net-provider mailing list
Firebird-net-provider@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/firebird-net-provider


Re: [Firebird-net-provider] Bulk copy

2007-07-24 Thread Eduardo Gamboa
Standalone.


""Carlos Guzmán Álvarez"" <[EMAIL PROTECTED]> wrote in message 
news:[EMAIL PROTECTED]
> Hello:
>
>> Carlos,
>> Wrapping the process in a single transaction reduced the time to only 
>> 4mins.
>>
>
> Are you using the embedded server or the standalone one ??
>
> -
> This SF.net email is sponsored by: Microsoft
> Defy all challenges. Microsoft(R) Visual Studio 2005.
> http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
> ___
> Firebird-net-provider mailing list
> Firebird-net-provider@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/firebird-net-provider
> 


-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
___
Firebird-net-provider mailing list
Firebird-net-provider@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/firebird-net-provider