やじゅ@アプリケーション・ラボ わんくま支局

目次

Blog 利用状況

ニュース

プロフィール

MSMVP

DataTableのLoad メソッド

DataSet と DataReader のパフォーマンスにおいては、DataReaderが速いというのは、仕組み的にも下記サイトの検証結果をみても分かる。

ADO.NETでのデータ取得を高速化するためのヒント
http://japan.internet.com/column/developer/20060307/26.html?rss

ADO.NET2.0から、DataTableのLoad メソッドが追加されたわけだが
http://www.microsoft.com/japan/msdn/net/adonet/datasetenhance.aspx

Dim dt As new DataTable
dt.Load(dataReader)

上記の結果から考えると、adapter.Fill(ds)よりは速いように思えてしまう
のだけど、下記サイトの検証結果によるとdt.Loadの方がそれなりに遅いようである。

DataSet vs DataReader 検証 .NET2.0
http://blogs.wankuma.com/ganfield/archive/2007/02/06/61084.aspx

DataGridViewなどのDataSourceにセットする場合は、素直にAdapter.Fillを使用した方がよさそうです。

また、dt.Load(dataReader) とAdapter.Fillで、挙動が違うなどもありますね。
dt.Load(dataReader)は制約(NULL)までも取り込んでしまう?
http://blogs.wankuma.com/ognac/archive/2008/06/13/143481.aspx

DataTableのLoad メソッドは、使用する場合はちと注意が必要かも。

投稿日時 : 2008年12月8日 1:45

コメントを追加

# re: DataTableのLoad メソッド 2008/12/08 2:37 通りすがり

うーん、キャッシュを無効化なんて非現実的な設定でベンチマークしてもあまり意味ないと思いますけどね。
まあおそらく速さが逆転していることはないとは思いますが、メモリアクセスが極度に遅くなってるわけで、
普通ならほとんどオーバーヘッドがないはずの操作が極端に影響を与えている可能性があります。

# When someone writes an paragraph he/she keeps the image of a user in his/her mind that how a user can know it. So that's why this piece of writing is outstdanding. Thanks! 2021/12/13 6:10 When someone writes an paragraph he/she keeps the

When someone writes an paragraph he/she keeps the image of a
user in his/her mind that how a user can know it.
So that's why this piece of writing is outstdanding.
Thanks!

# When someone writes an paragraph he/she keeps the image of a user in his/her mind that how a user can know it. So that's why this piece of writing is outstdanding. Thanks! 2021/12/13 6:11 When someone writes an paragraph he/she keeps the

When someone writes an paragraph he/she keeps the image of a
user in his/her mind that how a user can know it.
So that's why this piece of writing is outstdanding.
Thanks!

# When someone writes an paragraph he/she keeps the image of a user in his/her mind that how a user can know it. So that's why this piece of writing is outstdanding. Thanks! 2021/12/13 6:12 When someone writes an paragraph he/she keeps the

When someone writes an paragraph he/she keeps the image of a
user in his/her mind that how a user can know it.
So that's why this piece of writing is outstdanding.
Thanks!

# When someone writes an paragraph he/she keeps the image of a user in his/her mind that how a user can know it. So that's why this piece of writing is outstdanding. Thanks! 2021/12/13 6:13 When someone writes an paragraph he/she keeps the

When someone writes an paragraph he/she keeps the image of a
user in his/her mind that how a user can know it.
So that's why this piece of writing is outstdanding.
Thanks!

# doxycycline without prescription https://doxycyline1st.com/
doxycycline hyc 2022/02/26 10:02 Doxycycline

doxycycline without prescription https://doxycyline1st.com/
doxycycline hyc

# continuously i used to read smaller articles which also clear their motive, and that is also happening with this article which I am reading at this time. 2022/03/23 2:16 continuously i used to read smaller articles which

continuously i used to read smaller articles which also
clear their motive, and that is also happening with this article which
I am reading at this time.

# continuously i used to read smaller articles which also clear their motive, and that is also happening with this article which I am reading at this time. 2022/03/23 2:17 continuously i used to read smaller articles which

continuously i used to read smaller articles which also
clear their motive, and that is also happening with this article which
I am reading at this time.

# continuously i used to read smaller articles which also clear their motive, and that is also happening with this article which I am reading at this time. 2022/03/23 2:18 continuously i used to read smaller articles which

continuously i used to read smaller articles which also
clear their motive, and that is also happening with this article which
I am reading at this time.

# continuously i used to read smaller articles which also clear their motive, and that is also happening with this article which I am reading at this time. 2022/03/23 2:19 continuously i used to read smaller articles which

continuously i used to read smaller articles which also
clear their motive, and that is also happening with this article which
I am reading at this time.

# yGFYEBjgOEeMyzFZcmJ 2022/04/19 12:54 johnansaz

http://imrdsoacha.gov.co/silvitra-120mg-qrms

# medication for ed https://erectionpills.best/
over the counter erectile dysfunction pills 2022/06/28 11:21 ErectionPills

medication for ed https://erectionpills.best/
over the counter erectile dysfunction pills

# paxlovid composition https://paxlovid.best/
covid antivirals 2022/09/07 23:10 Paxlovid

paxlovid composition https://paxlovid.best/
covid antivirals

タイトル
名前
URL
コメント