boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
DotNet版 - DataReader vs. DataSet
相关主题
OleDbDataReader
using weather XML feed in C# - 2
intresting datagrid
关于SqlDataAdapter的初级问题求助
crystal report for .net
how to generate table in visual C#
[转载] C# 中comboBox DataBinding 问题
有什么简单的办法
How to Call Stored Procedure in C# .Net?
crystal report and asp.net
相关话题的讨论汇总
话题: datareader话题: dataset话题: sql话题: connection话题: avoids
进入DotNet版参与讨论
1 (共1页)
L*******r
发帖数: 1011
1
My words on this:
dataset way is more scalable, especially for busy service(a lot of
connections). But datareader is faster if not that many requests.
hehe, dataset just "looks faster" for busy web serive.
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnbda/html/bd
adotnetarch031.asp
In all of the preceding tests, we saw that DataReader outperformed DataSet. As
mentioned earlier, the DataReader offers better performance because it avoids
the performance and memory overhead ass
k****i
发帖数: 1072
2
Personally I like dataset more than datareader.
As you said datareader holds the connection exclusivly.Though the connection
pooling is done by the framework in most of the cases.I still like to share
the connection in my program if possible and it's clearer.

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnbda/html/bd
As
avoids
connection
it
it

【在 L*******r 的大作中提到】
: My words on this:
: dataset way is more scalable, especially for busy service(a lot of
: connections). But datareader is faster if not that many requests.
: hehe, dataset just "looks faster" for busy web serive.
: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnbda/html/bd
: adotnetarch031.asp
: In all of the preceding tests, we saw that DataReader outperformed DataSet. As
: mentioned earlier, the DataReader offers better performance because it avoids
: the performance and memory overhead ass

a**y
发帖数: 335
3
From my experience, most of the time, DataReader could do the job fine except
sometimes, I need some complex calculation towards a big data set. Probably,
i could achieve the same goal with SQL, but that would make the database too
slow. In this case, dataset is used. We do some sacrifice some memory, but
we saved the database.

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnbda/html/bd
DataSet.
the
data,
enough
the

【在 k****i 的大作中提到】
: Personally I like dataset more than datareader.
: As you said datareader holds the connection exclusivly.Though the connection
: pooling is done by the framework in most of the cases.I still like to share
: the connection in my program if possible and it's clearer.
:
: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnbda/html/bd
: As
: avoids
: connection
: it

y****t
发帖数: 10233
4
I think the key is when you need sort of "real time" data, you have to use
datareader.
and it always compare to dataadaptor instead of dataset.
BTW, is the post really "your words" :)

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnbda/html/bd
As
avoids
connection
it
it

【在 L*******r 的大作中提到】
: My words on this:
: dataset way is more scalable, especially for busy service(a lot of
: connections). But datareader is faster if not that many requests.
: hehe, dataset just "looks faster" for busy web serive.
: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnbda/html/bd
: adotnetarch031.asp
: In all of the preceding tests, we saw that DataReader outperformed DataSet. As
: mentioned earlier, the DataReader offers better performance because it avoids
: the performance and memory overhead ass

L*******r
发帖数: 1011
5

except
Probably,
~~~~~~~~~~~~~~~~~~~?
saved connections ba. :)
connection
share
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnbda/html/bd
optimized
while
not

【在 a**y 的大作中提到】
: From my experience, most of the time, DataReader could do the job fine except
: sometimes, I need some complex calculation towards a big data set. Probably,
: i could achieve the same goal with SQL, but that would make the database too
: slow. In this case, dataset is used. We do some sacrifice some memory, but
: we saved the database.
:
: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnbda/html/bd
: DataSet.
: the
: data,

k****i
发帖数: 1072
6

too
but
I think he was talking about using the in-memory dataset saved huge
server-side oepration at the back-end.
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnbda/html/bd
the
off
the

【在 L*******r 的大作中提到】
:
: except
: Probably,
: ~~~~~~~~~~~~~~~~~~~?
: saved connections ba. :)
: connection
: share
: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnbda/html/bd
: optimized
: while

L*******r
发帖数: 1011
7

So the point here is using the "cache" in dataset to do computing, am I right?

【在 k****i 的大作中提到】
:
: too
: but
: I think he was talking about using the in-memory dataset saved huge
: server-side oepration at the back-end.
: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnbda/html/bd
: the
: off
: the

a**y
发帖数: 335
8
I mean, we saved a lot of database operations.

【在 L*******r 的大作中提到】
:
: So the point here is using the "cache" in dataset to do computing, am I right?

L*******r
发帖数: 1011
9
Got you. I remembered some examples. SQL is not good at some sort of
calculation .
Thanks. :)

right?

【在 a**y 的大作中提到】
: I mean, we saved a lot of database operations.
st
发帖数: 1685
10
nothing is good if it's over used. hehe. I always believe in something in
between. the previous manager likes "cool" M$ stuff, so they wrote sql proc
over 3k lines, which became a disaster to maintain, debug, optimize later.
also M$ sql server replication latency is a know issue, it can hardly be
determined when replication will be done and it causes heavy network traffic

【在 L*******r 的大作中提到】
: Got you. I remembered some examples. SQL is not good at some sort of
: calculation .
: Thanks. :)
:
: right?

k****i
发帖数: 1072
11
Really?I mean the replication latency problem.I did the same thing in Sybase
replication server b4 and they worked well.Microsoft sql server is similar(if
not exact the same) to sybase.If it has such big latency problem,does it mean
that it's not suitbale for real time system?
btw,who can feed me the relationship(or history) between sybase sql server and
microsoft sql server?I am 2 lazy to do the research lah.

【在 st 的大作中提到】
: nothing is good if it's over used. hehe. I always believe in something in
: between. the previous manager likes "cool" M$ stuff, so they wrote sql proc
: over 3k lines, which became a disaster to maintain, debug, optimize later.
: also M$ sql server replication latency is a know issue, it can hardly be
: determined when replication will be done and it causes heavy network traffic

st
发帖数: 1685
12

I would suspect so, due to this problem, we use our own middleware for
real time and delayed quote delivery.

【在 k****i 的大作中提到】
: Really?I mean the replication latency problem.I did the same thing in Sybase
: replication server b4 and they worked well.Microsoft sql server is similar(if
: not exact the same) to sybase.If it has such big latency problem,does it mean
: that it's not suitbale for real time system?
: btw,who can feed me the relationship(or history) between sybase sql server and
: microsoft sql server?I am 2 lazy to do the research lah.

1 (共1页)
进入DotNet版参与讨论
相关主题
crystal report and asp.net
请问可能对C# dataSet作query吗?
XML转为Excel文件
真难搞:CLR stack overflow
asp.net为啥用linq来操作数据库呢,为啥不直接用sql语言?
.net操作数据库的方法,哪个最好?
求网络项目 (转载)
DataTable.NewRow的primary key初始为0的问题
ASP.NET IIS6 Hanging problem
question re: .net
相关话题的讨论汇总
话题: datareader话题: dataset话题: sql话题: connection话题: avoids