Re: Table bloat in Linq-SQL



Andrus <kobruleht2@xxxxxx> wrote:
var db = new MyDb(connString);

causes creation of all objects corresponding to all tables in database.

Database contains 500 tables.
Application accesses only few tables at a time.

Creating large number of objects which are not used is bad design.

How to force Linq-SQL to create table objects only when they are first
accessed ?

You could partition your database into several contexts. Are you sure
this is actually an issue for you though? How much memory are you
seeing being used?

--
Jon Skeet - <skeet@xxxxxxxxx>
http://www.pobox.com/~skeet Blog: http://www.msmvps.com/jon.skeet
If replying to the group, please do not mail me too
.



Relevant Pages

  • Problem creating new portal i SPS 2003
    ... 10:55:12 Starting portal creation for 'test only'. ... 10:55:12 Service database server is 'MyServer'. ... 10:55:12 Opening virtual server. ... 10:56:58 cmd.CommandText set as: Update dbo.propertylist set DisplayName = ...
    (microsoft.public.sharepoint.portalserver)
  • RE: Another Failed To create portal error - Log
    ... 14:28:00 Starting portal creation for 'vcxvdfvfd'. ... 14:28:00 Service database server is 'ABZWS1801'. ... 14:28:40 STS alert creation redirection to SPS Alert creation. ...
    (microsoft.public.sharepoint.portalserver)
  • Re: walkthrough required
    ... >> I really need a walkthrough to help me create a database app. ... >> creation of tables, etc. to creation of forms to populate the tables ... > if that's a bit steep then the Dummies book is a good inexpensive ... > google if you don't know what that is) then Greg Buczeks SQL Server ...
    (microsoft.public.dotnet.academic)
  • Re: How to retrive data from an external database?
    ... > database. ... Sole purpose of this is to get the object names, creation & ... Bear in mind that the structure of the ...
    (microsoft.public.access.tablesdbdesign)
  • Table bloat in Linq-SQL
    ... var db = new MyDb; ... causes creation of all objects corresponding to all tables in database. ... Database contains 500 tables. ... Application accesses only few tables at a time. ...
    (microsoft.public.dotnet.languages.csharp)