Re: DataTable efficiency

Brady Kelly <[email protected]> Thu, 22 Nov 2007 19:22:26 +0200
Newsgroups gmane.comp.windows.devel.dotnet.cx
Message-ID <[email protected]>
Have a look at the File Helpers library.  In my limited experiments, I =
found
that a good match for predefined formats, and a bit restrictive for =
general
cases, as it uses attributes on members to define columns.  I found
Sebastien's library very nice for general cases, but restrictive in only
handling char delimiters.  Both are excellent pieces of work, however, =
and
I'm sure can be adapted to most situations.

-----Original Message-----
From: Discussion relating to the specifics of the C# and Managed C++
languages [mailto:[email protected]] On Behalf Of Alan =
Baljeu
Sent: 22 November 2007 06:37 PM
To: [email protected]
Subject: Re: [DOTNET-CX] DataTable efficiency

I like it in concept, but... Currently I'm using the ODBC driver to read
these files.  It
uses schema.ini to convert specified columns to bool or int.  Your code =
just
gives me
strings.  Have you any suggestion on how I might adapt the CSV reader to
parse columns
according to a schema?  Initially I imagine putting this stuff into
DataTables because
anything else will require much code conversion.

> -----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: Wednesday, November 21, 2007 11:09 PM
> To: [email protected]
> Subject: Re: [DOTNET-CX] DataTable efficiency
>=20
> You may want to take a look at my CSV reader found on Code Project:
>=20
> http://www.codeproject.com/cs/database/CsvReader.asp
>=20
> Sebastien
>=20
> On 11/21/07, Alan Baljeu <[email protected]> wrote:
> > My application uses a largish readonly database (CSV files,=20
> actually)=20
> > consisting of several tables.  These tables are accessed somewhat=20
> > frequently, and I want to make this as efficient as=20
> possible.  I'm currently using plain DataTable objects=20
> produced by OdbcAdapters and
> > queries.     These tables are cached so I'm just searching=20
> in-memory tables after that.  My
> > queries look like "SELECT * FROM [{0}]" and occasionally=20
> "SELECT * FROM [{0}] where [{1}] =3D
> > '{2}'".    I'm thinking of splitting the latter into just=20
> table.Select("colname =3D value").
> >
> > I have a nagging suspicion that the DataTable structure isn't=20
> > super-efficient, or that certain ways of using it are=20
> effcient while others aren't.
> >
> > Is this so?  Are there certain things I should avoid?  Do you=20
> > recommend a certain style for efficient access?  Is there a=20
> better approach that DataTable?
> >
> > =
=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(R)  http://www.develop.com
> >
> > View archives and manage your subscription(s) at=20
> > http://discuss.develop.com
> >
>=20
>=20
> --
> S=E9bastien
> www.sebastienlorion.com
>=20
> =
=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
>=20
> View archives and manage your subscription(s) at=20
> http://discuss.develop.com

=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

=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