473,406 Members | 2,710 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

Q: slow data adaptor

Hi

I am loading a DataSet using a DataAdaptor e.g.

myDataAdaptor = New OleDb.OleDbDataAdaptor("Select * From [myTable]",
myConnection)

myDataAdaptor.Fill(myDataSet, "MyTable")

The table is very large and it takes quite a few seconds for these two steps
to complete. I do not need to write back to the table and I was wondering if
using a DataAdaptor may be a bit of overkill. I do need a DataSet to perform
some quite complicated data analysis.

I believe that a DataReader may be a way of speeding things up but I don't
have any idea of how to do the above using it. I'm sure this is a very
simple question so please forgive my ignorance - you may have gathered that
I'm new to all this database stuff!

Thanks in advance

Geoff
Nov 21 '05 #1
6 1170
Geoff,

You can maybe gain some seconds however for reading (fill) is the
dataadapter at this moment using the datareader. So that will probably not
speed up your reading.

I have readed in the AdoNet newsgroup that when you use not all columns it
will speed up to specify them, however even from that I am not sure. I never
will use huge datasets.

The slow point is probably your database, by instance ms-access is terrible
slow.

I hope this helps anyhow?

Cor
Nov 21 '05 #2
As always Cor very enlightening

Geoff

"Cor Ligthert" <no************@planet.nl> wrote in message
news:OX**************@TK2MSFTNGP14.phx.gbl...
Geoff,

You can maybe gain some seconds however for reading (fill) is the
dataadapter at this moment using the datareader. So that will probably not
speed up your reading.

I have readed in the AdoNet newsgroup that when you use not all columns it
will speed up to specify them, however even from that I am not sure. I
never will use huge datasets.

The slow point is probably your database, by instance ms-access is
terrible slow.

I hope this helps anyhow?

Cor

Nov 21 '05 #3
On the same topic, maybe somebody can answer a question has been puzzling me
for some time. I have seen on many postings and web sites that it isn't a
good idea to load a DataSet with a large number of records e.g. > 10000.

This begs the question, and forgive me if I'm being naive here, but what is
the alternative? If, as I suspect, it is to use raw SQL to do all the
searches, relationships etc. then why isn't this done for all database work?
Why use a DataSet?

I'd be interested to hear your comments.

Geoff

"Geoff Jones" <no********@email.com> wrote in message
news:42***********************@news.dial.pipex.com ...
As always Cor very enlightening

Geoff

"Cor Ligthert" <no************@planet.nl> wrote in message
news:OX**************@TK2MSFTNGP14.phx.gbl...
Geoff,

You can maybe gain some seconds however for reading (fill) is the
dataadapter at this moment using the datareader. So that will probably
not speed up your reading.

I have readed in the AdoNet newsgroup that when you use not all columns
it will speed up to specify them, however even from that I am not sure. I
never will use huge datasets.

The slow point is probably your database, by instance ms-access is
terrible slow.

I hope this helps anyhow?

Cor


Nov 21 '05 #4
Geoff,

Although that has as well alternatives. What when you use PDA's and need all
the data to pull down once every week without that updating is needed. Is
than a huge dataset not a great solution.

However, when you needs two tables and you know from from that what, by
instance let say an order, is than this not much nicer to get the data.

Select * from OrderHeadings where customer = @customerId
Select * from OrderRows where customer = @customerId
(and than keep it simple without any join)

And than process those two tables.

(And than first update the header and than the orderrows)

Just my idea

Cor
Nov 21 '05 #5
Interesting. Thanks Cor

"Cor Ligthert" <no************@planet.nl> wrote in message
news:Oj**************@TK2MSFTNGP09.phx.gbl...
Geoff,

Although that has as well alternatives. What when you use PDA's and need
all the data to pull down once every week without that updating is needed.
Is than a huge dataset not a great solution.

However, when you needs two tables and you know from from that what, by
instance let say an order, is than this not much nicer to get the data.

Select * from OrderHeadings where customer = @customerId
Select * from OrderRows where customer = @customerId
(and than keep it simple without any join)

And than process those two tables.

(And than first update the header and than the orderrows)

Just my idea

Cor

Nov 21 '05 #6

I had to upgrade my Access database to SQL2000 after it got soo big. The
lookups just got too slow for production. Seems access was slow even
with 100k records or so. MSSQL is almost instant. Money well spent.

And the beauty was that converting code to work with sql was pretty much
just changing the connection string, everything else just fell into
place.
"Geoff Jones" <no********@email.com> wrote in
news:42***********************@news.dial.pipex.com :
Hi

I am loading a DataSet using a DataAdaptor e.g.

myDataAdaptor = New OleDb.OleDbDataAdaptor("Select * From [myTable]",
myConnection)

myDataAdaptor.Fill(myDataSet, "MyTable")

The table is very large and it takes quite a few seconds for these two
steps to complete. I do not need to write back to the table and I was
wondering if using a DataAdaptor may be a bit of overkill. I do need a
DataSet to perform some quite complicated data analysis.

I believe that a DataReader may be a way of speeding things up but I
don't have any idea of how to do the above using it. I'm sure this is
a very simple question so please forgive my ignorance - you may have
gathered that I'm new to all this database stuff!

Thanks in advance

Geoff


--
---------
Der Chef Groovy
ICQ: 1529949
Nov 21 '05 #7

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

Similar topics

3
by: Stanislaw Salik | last post by:
Hi, Lets suppose we want to use generic algotithms on collections of pointers (both raw and smart). For example, we want to sort a vector of (smart)pointers. We need a comparator that will take...
3
by: Matthias Kaeppler | last post by:
Hello, I need to sort a range of pointers with a predicate which applies to the pointees. I tried to use boost::indirect_iterator, however, this will sort the container with the pointees instead...
1
by: Tony Johansson | last post by:
Hello! I'm reading about design pattern adaptor in the GOF book and there is something that sounds strange. When you use the adaptor design pattern you have these participants. *Target -...
0
by: Tony Johansson | last post by:
Hello!! This is about the adaptor design pattern. If you use the class adaptor its easy to override. It says an object adaptor makes it harder to override Adaptee behavior. It will require...
1
by: | last post by:
Greetings All, I'm trying to access a excel file using the odbc data adaptor but the tables arent showing up. I can get connected to the excel file using the Wizard but when I go to do the odbc...
29
by: Geoff Jones | last post by:
Hi All I hope you'll forgive me for posting this here (I've also posted to ado site but with no response so far) as I'm urgently after a solution. Can anybody help me? I'm updating a table on...
5
by: Pankaj | last post by:
Hi i am inserting the data into database throught variables. On click event of button m using this code: Dim objCon As New OleDbConnection(CONNECTION) Dim objCmd As New OleDbCommand(SQL,...
3
by: iKiLL | last post by:
Hi all The Code is below but i will give you a brief over view first. I am using C#, SQL Mobile and the CF2.0 with Merge Replication. My Primary Keys are all "uniqueidentifier" types...
5
by: Sanjay Pais | last post by:
I have a table with over 1.3 million rows. I am retrieving only 20 at a time using the with - over clauses In query analyser, the data is retrieved in under a second. When retrieving using the...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
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
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
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,...
0
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...

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.