Re: DataTable versus DataSet by Patrice
Patrice
Wed May 07 06:26:15 CDT 2008
A dataset is basically a collection of tables. It's likely that most of the
cost will go into filling the table with data rather than in handling a
collection that has a single element. Use what makes sense for your
application. You could easily verify this if it doesn't seems obvious.
If you have a performance problem, IMO one of the first step would be first
to double check the query and in particular the amount of data you are
getting into your datatable (do youi need all columns, do you need all rows
?)...
--
Patrice
"mark-seattle" <markseattle@discussions.microsoft.com> a écrit dans le
message de groupe de discussion :
4C5B9005-AEA4-4EA0-BDC9-F95DD1000DB6@microsoft.com...
> Is there any performance difference between creating and filling a
> DataTable
> and a single datatable dataset, or is it really the same thing under the
> covers.
>
> In other words, do you pay any overhead for
>
>
> myDS = Create & Fill Dataset with single datatable
> MyDT = myDS.Tables(0)
>
> versus just creating DT directly as a datatable and filling it?
>
>
>