Re: DataTable efficiency

Alan Baljeu <[email protected]> Tue, 27 Nov 2007 09:36:25 -0500
Newsgroups gmane.comp.windows.devel.dotnet.cx
Message-ID <031501c83102$e3b1e000$1dc80ac6@CTI>
One of the problems I have with ADO.net, is Microsoft forgot to mention =
exactly how
efficient their code is.  This doesn't matter for a lot of things, but =
with database stuff
and lots of data, people would like to know.  If I load data into a =
stream, and then feed
that stream to a datatable, how long does that take, or what steps does =
the system follow?
If I add the two tables and then create a DataRelation, is creating the =
relation fast or
slow?  What datastructure is built?  How are the tables indexed?  Is =
there some mysterious
overhead due to the tremendous generality of the system?

Is your CSV reader more efficient because it bypasses ODBC, or is there =
more gains here?
Etc.  It's almost enough to make me want to roll my own, so I know and =
can change things if
I'm not satisfied.


> -----Original Message-----
> From: Discussion relating to the specifics of the C# and=20
> Managed C++ languages [mailto:[email protected]]=20
> On Behalf Of S=E9bastien Lorion
> Sent: Friday, November 23, 2007 2:19 AM
> To: [email protected]
> Subject: Re: [DOTNET-CX] DataTable efficiency
>=20
> Sorry, just realized that the DataTable.Load method is=20
> available only in .NET 2.0.... In that case, you will need to=20
> derive a class from DbDataAdapter in order to expose the=20
> protected method DbDataAdapter.Fill(DataTable, IDataReader).
>=20
> S=E9bastien
>=20
> On 11/23/07, S=E9bastien Lorion <[email protected]> wrote:
> > You can create the DataTable before hand and then use the=20
> Load method=20
> > (the CsvReader implement IDataReader).
> >
> > S=E9bastien
> >
> > On 11/23/07, Alan Baljeu <[email protected]> wrote:
> > > I like it in concept, but... Currently I'm using the ODBC=20
> driver to=20
> > > read these files.  It uses schema.ini to convert=20
> specified columns=20
> > > to bool or int.  Your code just gives me strings.  Have you any=20
> > > suggestion on how I might adapt the CSV reader to parse columns=20
> > > according to a schema?  Initially I imagine putting this=20
> stuff into DataTables because anything else will require much=20
> code conversion.

=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
This list is hosted by DevelopMentor=AE  http://www.develop.com

View archives and manage your subscription(s) at http://discuss.develop.com