By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,830 Members | 812 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,830 IT Pros & Developers. It's quick & easy.

Dataset or SQL? wich is faster?

P: n/a
Hi,

I have a question, wich goes faster (The table has 15000 rows in it and
growing every day)?

- at the start of the program run a querry and put this in a dataset and
during the program search the dataset for the information needed
- use a SQL querry for every time you need some value from the database
(wich will return 1 value)?

Thanks
Joris
May 10 '06 #1
Share this Question
Share on Google+
5 Replies


P: n/a
Once the table gets above over a certain size, running a SQL query will be
faster.

Additionally, using up tons of memory to keep thousands of rows in memory at
a time is wasteful. At some point, you won't have enough memory to contain
the entire table anyway.

"Joris De Groote" <jo************@skynet.be> wrote in message
news:uT**************@TK2MSFTNGP03.phx.gbl...
Hi,

I have a question, wich goes faster (The table has 15000 rows in it and
growing every day)?

- at the start of the program run a querry and put this in a dataset and
during the program search the dataset for the information needed
- use a SQL querry for every time you need some value from the database
(wich will return 1 value)?

Thanks
Joris

May 10 '06 #2

P: n/a
So I'll use SQL, thanks!

"Marina Levit [MVP]" <so*****@nospam.com> wrote in message
news:Og**************@TK2MSFTNGP02.phx.gbl...
Once the table gets above over a certain size, running a SQL query will be
faster.

Additionally, using up tons of memory to keep thousands of rows in memory
at a time is wasteful. At some point, you won't have enough memory to
contain the entire table anyway.

"Joris De Groote" <jo************@skynet.be> wrote in message
news:uT**************@TK2MSFTNGP03.phx.gbl...
Hi,

I have a question, wich goes faster (The table has 15000 rows in it and
growing every day)?

- at the start of the program run a querry and put this in a dataset and
during the program search the dataset for the information needed
- use a SQL querry for every time you need some value from the database
(wich will return 1 value)?

Thanks
Joris


May 10 '06 #3

P: n/a
Additionally, don't forget about concurrency issues. What happens when another
user modifies a record you have in your dataset?

If you are not worried about changing data, why bother with the dataset?
Why not just use one of the types in System.Collection which are much smaller.
With either in-memory representation of the data, you are still not benifiting
from any indexing that the database uses to optomize your query.

With the number of records you are talking, I would definately argue in favor
of the database assuming network bandwidth isn't too much of an issue. If
it is, I wouldn't want to think about sending 15000 records across the pipe
either.

Jim Wooley
http://devauthority.com/blogs/jwooley/default.aspx
Once the table gets above over a certain size, running a SQL query
will be faster.

Additionally, using up tons of memory to keep thousands of rows in
memory at a time is wasteful. At some point, you won't have enough
memory to contain the entire table anyway.

"Joris De Groote" <jo************@skynet.be> wrote in message
news:uT**************@TK2MSFTNGP03.phx.gbl...
Hi,

I have a question, wich goes faster (The table has 15000 rows in it
and growing every day)?

- at the start of the program run a querry and put this in a dataset
and
during the program search the dataset for the information needed
- use a SQL querry for every time you need some value from the
database
(wich will return 1 value)?
Thanks
Joris

May 10 '06 #4

P: n/a
15k record? lol

who gives a crap about 15k records; it's like nothing

how wide is it?

May 10 '06 #5

P: n/a
Liz

"Joris De Groote" <jo************@skynet.be> wrote in message
news:uT**************@TK2MSFTNGP03.phx.gbl...
I have a question, wich goes faster (The table has 15000 rows in it and
growing every day)? - at the start of the program run a querry and put this in a dataset and
during the program search the dataset for the information needed
- use a SQL querry for every time you need some value from the database
(wich will return 1 value)?


Generally speaking, I don't think the DataSet was designed to migrate the
functionality of a relational database server to client machines and, unless
there is some very particularized reason for doing so, it seems inadvisable.
Let the RDBMS do what it does very well; that's why you have it.

It seems to me that the occasion to employ an in-memory relational store on
the client is in situations where you are bringing together disparate and
disconnected data sources that need to be related ... such as a scenario
where have perhaps two SQL Server tables, one Oracle table and a local
Access table which need to be treated as a single related collection.

L

May 10 '06 #6

This discussion thread is closed

Replies have been disabled for this discussion.