473,412 Members | 2,087 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,412 software developers and data experts.

Dataset or SQL? wich is faster?

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
5 1496
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
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
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
15k record? lol

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

how wide is it?

May 10 '06 #5
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Soeren D. | last post by:
I have read how one can define tables, indices, relations etc. in .Net code in a way that allows you to run a off-line XML based ADO.NET, which is excactly what I need. I have also read about...
8
by: Nikhilesh Mehendale | last post by:
I have written a web service in C#, .NET 1.1 which reads a XML file into a dataset. This is just a plain XML file. First I use the Dataset.ReadXmlScheme function and pass the XML file to it. Then...
5
by: Benny Raymond | last post by:
I'm nearly done writing the first version of my tracking app and I'm starting to re-think the way I store my database. Currently I have my database setup as an xml dataset. Before I started the...
14
by: Bihn | last post by:
I was reading about datareader which is said to be slimmer & faster then dataset. Since the datareader have to go fetching the dat from the database every time it need it, the data it gets then...
2
by: UJ | last post by:
I have a dataset that will have say 10000 records in it with the names of files that are used by the system. I then have a large directory of files that correspond to that list of files and want to...
1
by: Mrozu | last post by:
Hi I need execute SELECT SQL query in DataSet. No in SQL server(da.selectcommand) and fill dataset, only show in datagrid filtered by select-where query records from dataset:) For example I...
4
by: Joris De Groote | last post by:
Hi, (my code is @ the bottom of this message) I have a piece of code that runs the rows of a dataset until it finds the one needed. When he finds it, I delete that row and start all over...
3
by: Gabriel | last post by:
Hi I have an SQL Server stored procedure wich returns ceratin data and I have it in a Dataset. I am supposed to change that data into an specific standard XML format and write it to file. I am...
2
by: Marcolino | last post by:
Hi all, I have an application that needs to import XML files into Database. This XML file was generated by this: Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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
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
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
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...
0
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...

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.