you must start a transaction,it will run faster.
trans = cnn.BeginTransaction();
while (reader.Read())
{
// process each row
}
trans.Commit();


2006/9/7, Marvin Cook < [EMAIL PROTECTED]>:
I am processing a dataset with 100,000 + records (around 70MB) which I select 26,000+ into a datagrid.  Works very fast.  I recomment that you read the records into a datatable and then process that table.  The reader may be buffering the data which causes more DB hits.

Marv


On 9/6/06, Jaroslaw Zycinski < [EMAIL PROTECTED]> wrote:
Folks,

I have a relatively small database, the biggest table  ("myTable") is 23
000 records, aprox. size 5MB.
I use a basic query: SELECT * FROM myTable, I execute it and then I process
each row:
while (reader.Read())
{
   // process each row
}

Using classic server it works perfectly fine, but when I switched to
embedded server it became maybe 10 times slower - it takes almost 1 minute
to process 23 000 records whereas with classic version it needs a couple of
seconds. Slow is while loop.

I tried different versions of server (dll lib) and of .NET provider
available on the web (including the latest ones). I tried setting FetchSize
and PacketSize in connection string that probably has no effect.
My machine is quite fast - 2 processors 3.2GHz each, 3.5 GB RAM, Windows XP
Pro Sp2 fully patched.

I spent hours on googling for the solution, but the only thing that I found
is the fact that embedded server fetches each row separately and classic
one takes more so it doesn't waste time for communication.

I am not sure if I can do anything with this.
Any ideas?

TIA
Jarek


-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Firebird-net-provider mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/firebird-net-provider


-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642

_______________________________________________
Firebird-net-provider mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/firebird-net-provider



-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Firebird-net-provider mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/firebird-net-provider

Reply via email to