473,499 Members | 1,689 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Slow Fill method of DataAdapter class

Hello

I tried to find answer on google but i didnt find it.
Using MySQL 4, with MyODBC driver
This code:

string sql = "SELECT * FROM Poruke";
OdbcDataAdapter da = new OdbcDataAdapter();
da.SelectCommand = new OdbcCommand(sql, conn);
DataSet ds = new DataSet();
da.Fill(ds,"Poruke");

takes about 2.5 minutes to run. There are ~36000 records in the table,
12 columns.It is not problem with the network, because i have tried this
on local machine as well.
Does anyone know what is the problem here?

Radovan
Nov 16 '05 #1
6 7316
Look at the indices you've defined on the Poruke table.... perhaps it's
doing a linear search in the table and that's what's taking so long.

--
John Wood
EMail: first name, dot, second name at priorganize.com
"Radovan Radic" <rr****@yahoo.com> wrote in message
news:ej**************@TK2MSFTNGP11.phx.gbl...
Hello

I tried to find answer on google but i didnt find it.
Using MySQL 4, with MyODBC driver
This code:

string sql = "SELECT * FROM Poruke";
OdbcDataAdapter da = new OdbcDataAdapter();
da.SelectCommand = new OdbcCommand(sql, conn);
DataSet ds = new DataSet();
da.Fill(ds,"Poruke");

takes about 2.5 minutes to run. There are ~36000 records in the table,
12 columns.It is not problem with the network, because i have tried this
on local machine as well.
Does anyone know what is the problem here?

Radovan

Nov 16 '05 #2
First you need to determine if the bottleneck is with the query (try running
it with a DataReader or from Access) or not. It could also be a bandwidth
issue. 36,000 is a VERY large amount of records and not well advised - you
could break this up and run them in seperate threads or just grab a subset
and use what you need caching say 6,000 at a time. There's nothing that can
be done with .Fill other than speeding up the query- remember that you are
loading all that data locally on your machine(use TaskManager and watch the
resources) and that's a good bit of data. Also, SELECT * usually pulls over
a few columns (usually, definitely not always) that you dont' need, so it's
usually not a good idea to use it unless you definintely need all of those
column's data.

--

W.G. Ryan, eMVP

Have an opinion on the effectiveness of Microsoft Embedded newsgroups?
Let Microsoft know!
https://www.windowsembeddedeval.com/...ity/newsgroups
"Radovan Radic" <rr****@yahoo.com> wrote in message
news:ej**************@TK2MSFTNGP11.phx.gbl...
Hello

I tried to find answer on google but i didnt find it.
Using MySQL 4, with MyODBC driver
This code:

string sql = "SELECT * FROM Poruke";
OdbcDataAdapter da = new OdbcDataAdapter();
da.SelectCommand = new OdbcCommand(sql, conn);
DataSet ds = new DataSet();
da.Fill(ds,"Poruke");

takes about 2.5 minutes to run. There are ~36000 records in the table,
12 columns.It is not problem with the network, because i have tried this
on local machine as well.
Does anyone know what is the problem here?

Radovan

Nov 16 '05 #3
Correct me if I'm wrong - but why would he need an index? His select statement does not have a WHERE clause. A linear search is
exactly what needs to be performed (because all values are returned) right?

--
Adam Clauss
ca*****@tamu.edu

"John Wood" <sp**@isannoying.com> wrote in message news:eh**************@TK2MSFTNGP09.phx.gbl...
Look at the indices you've defined on the Poruke table.... perhaps it's
doing a linear search in the table and that's what's taking so long.

--
John Wood
EMail: first name, dot, second name at priorganize.com
"Radovan Radic" <rr****@yahoo.com> wrote in message
news:ej**************@TK2MSFTNGP11.phx.gbl...
Hello

I tried to find answer on google but i didnt find it.
Using MySQL 4, with MyODBC driver
This code:

string sql = "SELECT * FROM Poruke";
OdbcDataAdapter da = new OdbcDataAdapter();
da.SelectCommand = new OdbcCommand(sql, conn);
DataSet ds = new DataSet();
da.Fill(ds,"Poruke");

takes about 2.5 minutes to run. There are ~36000 records in the table,
12 columns.It is not problem with the network, because i have tried this
on local machine as well.
Does anyone know what is the problem here?

Radovan


Nov 16 '05 #4
Yep true, unless Poruke was a view rather than a table.
I was a bit hasty in that response.. sorry about that.

--
John Wood
EMail: first name, dot, second name at priorganize.com
"Adam Clauss" <ca*****@tamu.edu> wrote in message
news:uy**************@TK2MSFTNGP12.phx.gbl...
Correct me if I'm wrong - but why would he need an index? His select statement does not have a WHERE clause. A linear search is exactly what needs to be performed (because all values are returned) right?
--
Adam Clauss
ca*****@tamu.edu

"John Wood" <sp**@isannoying.com> wrote in message

news:eh**************@TK2MSFTNGP09.phx.gbl...
Look at the indices you've defined on the Poruke table.... perhaps it's
doing a linear search in the table and that's what's taking so long.

--
John Wood
EMail: first name, dot, second name at priorganize.com
"Radovan Radic" <rr****@yahoo.com> wrote in message
news:ej**************@TK2MSFTNGP11.phx.gbl...
Hello

I tried to find answer on google but i didnt find it.
Using MySQL 4, with MyODBC driver
This code:

string sql = "SELECT * FROM Poruke";
OdbcDataAdapter da = new OdbcDataAdapter();
da.SelectCommand = new OdbcCommand(sql, conn);
DataSet ds = new DataSet();
da.Fill(ds,"Poruke");

takes about 2.5 minutes to run. There are ~36000 records in the table,
12 columns.It is not problem with the network, because i have tried this on local machine as well.
Does anyone know what is the problem here?

Radovan



Nov 16 '05 #5
Ah... true true. I have not had much experience working with views and had not considered that possibility.

--
Adam Clauss
ca*****@tamu.edu

"John Wood" <sp**@isannoying.com> wrote in message news:ut**************@TK2MSFTNGP12.phx.gbl...
Yep true, unless Poruke was a view rather than a table.
I was a bit hasty in that response.. sorry about that.

--
John Wood
EMail: first name, dot, second name at priorganize.com
"Adam Clauss" <ca*****@tamu.edu> wrote in message
news:uy**************@TK2MSFTNGP12.phx.gbl...
Correct me if I'm wrong - but why would he need an index? His select

statement does not have a WHERE clause. A linear search is
exactly what needs to be performed (because all values are returned)

right?

--
Adam Clauss
ca*****@tamu.edu

"John Wood" <sp**@isannoying.com> wrote in message

news:eh**************@TK2MSFTNGP09.phx.gbl...
Look at the indices you've defined on the Poruke table.... perhaps it's
doing a linear search in the table and that's what's taking so long.

--
John Wood
EMail: first name, dot, second name at priorganize.com
"Radovan Radic" <rr****@yahoo.com> wrote in message
news:ej**************@TK2MSFTNGP11.phx.gbl...
> Hello
>
> I tried to find answer on google but i didnt find it.
> Using MySQL 4, with MyODBC driver
> This code:
>
> string sql = "SELECT * FROM Poruke";
> OdbcDataAdapter da = new OdbcDataAdapter();
> da.SelectCommand = new OdbcCommand(sql, conn);
> DataSet ds = new DataSet();
> da.Fill(ds,"Poruke");
>
> takes about 2.5 minutes to run. There are ~36000 records in the table,
> 12 columns.It is not problem with the network, because i have tried this > on local machine as well.
> Does anyone know what is the problem here?
>
> Radovan



Nov 16 '05 #6
could it possibly be a shortage of physical memory at the client,
causing it to page like crazy just to get all of the DataSet into
virtual memory?

Radovan Radic wrote:
Hello

I tried to find answer on google but i didnt find it.
Using MySQL 4, with MyODBC driver
This code:

string sql = "SELECT * FROM Poruke";
OdbcDataAdapter da = new OdbcDataAdapter();
da.SelectCommand = new OdbcCommand(sql, conn);
DataSet ds = new DataSet();
da.Fill(ds,"Poruke");

takes about 2.5 minutes to run. There are ~36000 records in the table,
12 columns.It is not problem with the network, because i have tried this
on local machine as well.
Does anyone know what is the problem here?

Radovan

Nov 16 '05 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
1606
by: JeffB | last post by:
I have tried several different methods of getting a datagrid to fill with information. Below is the code I'm now using. When viewed in the browser and the text box filled with a parameter value...
7
4557
by: Denise | last post by:
I just realized the DataTable_RowChanging events were firing when I called Fill method of the DataAdapter! It fires TWICE for each row loaded. I thought these were only supposed to be called when...
1
4828
by: Nikolay Petrov | last post by:
How to fill dataset with multiple tables and set their relaition? Can I get the relations from the SQL server? Also I would like to do it using stored procedures. TIA
13
2118
by: dbuchanan | last post by:
This code resets a form with two cbo's (comboBoxes) and one datagrid. The first cbo (cboSelection) selects a main table and filters the second cbo. The second cbo (cboView) selects the secondary...
2
2091
by: pwh777 | last post by:
I need help in understanding the DataAdapter Fill method and how it relates to the binding to controls on a form. I have a table called tbl_CID_XRef on SQL Server. I have written as a test the...
1
5206
by: Rich | last post by:
Hello, I want to use a dataAdapter to insert rows into a table on a sql server DB. I understand that the DataAdapter will automatically handle concurrency issues. So first I have to get a table...
0
4526
by: mike1402 | last post by:
Hi ! I get the error below sometimes when retrieving a big amount of data using Datadapter.Fill(dataset,"table"). But when I send the command Fill again, there is no error. Is it a fault of...
5
3788
Coldfire
by: Coldfire | last post by:
I am having problem with slow crystal report loading plus slow dataadapter.fill method here is my code string SelectCmd = "SELECT * FROM EnterInstituteInformation WHERE...
1
1424
by: D | last post by:
I am experiencing slow response from my fill command. I am trying to open a database and one table and add data at some point. Is there a way to just open the table without all the data being read...
0
7014
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7229
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
7395
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5485
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
4921
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4609
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3108
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3103
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1429
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.