Dataset overhead

M

M D

I was trying to get a feel of how much faster it might be to use a
dataset rather than writing a new working table in SQL Server.

The event log reports:
"aspnet_wp.exe (PID: 2284) was recycled because memory consumption
exceeded the 143 MB (60 percent of available RAM)."
(This is just localhost on my workstation.)

Commenting out the DataAdapter.fill and reloading, the Taskmanager
reports aspnet_wp.exe as using slightly more than 20 Mb during and after
the page is loaded.

1) I used the VS wizard to create the sqlConnection & dataset
2) I had to go into the restricted region and type in a "good"
connection string to make it work

It's a stored procedure but here's what the table structure would be:
CREATE TABLE [ralph] (
[a] [varchar] (9) NOT NULL ,
[int] NULL ,
[c] [char] (3) NULL ,
[d] [char] (2) NULL ,
[e] [bit] NULL ,
[f] [char] (6) NULL ,
[g] [char] (1) NULL ,
[h] [bit] NULL ,
[char] (1) NULL ,
[j] [bit] NULL ,
[k] [char] (1) NULL ,
[l] [char] (2) NULL ,
[m] [char] (2) NULL ,
[n] [char] (2) NULL ,
[o] [char] (1) NULL ,
[p] [char] (1) NULL ,
[q] [char] (2) NULL
) ON [PRIMARY]

Even assuming the bits take up a whole char each that's 40 bytes per
record and a million records should be less than 40Mb. That's
significantly less than the 123Mb used up before the operating system
intercedes.

What's going on in memory here? What's the overhead?

thx
md
 
A

Alvin Bruney [MVP]

You have to remember, a dataset must contain information on the layout of
the data. That makes it significantly fatter IMO. But you are simply asking
the wrong question. A dataset is not designed to replace a database, it is
simply a way to work with the data contained in the database in a
disconnected fashion.

--
Regards,
Alvin Bruney [Microsoft MVP ASP.NET]

[Shameless Author plug]
The Microsoft Office Web Components Black Book with .NET
Now Available @ http://www.lulu.com/owc
 
M

M D

Which is what I was trying to do. You see the whole database has nearly
19 million records in that, main, table with twice the columns as my
temporary work table.

thx
md
 
A

Alvin Bruney [MVP]

so one thing you could do is spit the dataset out to file as XML and use an
XML parser to sift thru the records. You give up a lot in terms of
performance though

--
Regards,
Alvin Bruney [Microsoft MVP ASP.NET]

[Shameless Author plug]
The Microsoft Office Web Components Black Book with .NET
Now Available @ http://www.lulu.com/owc
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,482
Members
44,901
Latest member
Noble71S45

Latest Threads

Top