Re: Access DB grows too fast.

From: Nate Clark (ntclark_at_attglobal.net)
Date: 06/28/04


Date: Mon, 28 Jun 2004 17:41:42 GMT

Before anyone invests a lot of time on this ....

I may have been wrong in my original post in that the updating of an
ADODB recordset (strategy 1) causes the huge Access database. I have
reverted that code and while it's running right now, I'm not seeing this
big DB getting created.

On the other hand, I believe that I set the VB application's connection
up to operate synchronously and that that might be the reason why using
the cursor in VB is not growing the DB. If this is true, it would seem
like the "huge" database might perhaps be because there are many records
of "uncommitted" data in the '.db.

I will confirm all of this once the current test finishes and after I
can setup the C code's connection to be synchronous too and try that out.

Nate Clark wrote:
>
> Hi All and thanks for the help.
>
>
> I have an application that needs to store a large # of records in
> multiple tables.
>
> Application is written in VB.
>
> The problem that I am having is that after insert of these records (test
> case is 900 K records), I get a '.mdb that is nearly 1 GB in size. I
> then compact this database and get it down to about 155 MB in size. The
> only activity in getting that huge size is the insert(s) of the large #
> of rows.
>
> It seems that Access is wasting huge chunks of space during the import
> of these files and/or I am doing something wrong or not doing something
> I should be.
>
> I have tried 2 types of "bulk inserts" (BTW I cannot find an actual bulk
> insert for Access. Is there one ?)
>
>
> 1. Declaring an ADODB recordset using sql such as:
>
> SELECT * FROM Table WHERE ID = -1
>
> Which is guaranteed to be empty when the rs opens (ID can't be < 0 ),
> and then adding to that recordset (.AddNew) and then updating it every
> 32 K records or so.
>
>
> 2. Writing my data out to a flat file and then calling C code that uses
> the ODBC API SQLPrepare technique to create a parameterized SQL
> statement which I then use to load data from the flat file.
>
>
> (Preliminary results - method 2 much faster)
>
> Both methods give me this huge database after this import.
>
> Further, and somewhat worrisome, after I get about 2+ million records in
> the database, I start getting "Invalid Parameter" errors all over the
> application (My fields are Long Integer which should provide me with
> values in a very large range - well above 2+ million anyway)
>
>
> I see from reading my own post that indeed I haven't tried single
> "INSERTS". This is something I will try now but I'll go ahead and post
> the question as I'm not really confident that is something that's going
> to fix this problem.
>
>



Relevant Pages

  • Re: datagrid update command
    ... -i display it on a textbox on the form b4 updating the dataset ... >> hi sir ... > always cause error says that CType is not defined inmy namespace, ... > how can i update the database or the dataset without knowing the value ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Looping through a datagrid
    ... updating of the data when the request is posted back to the server. ... This is my> first attempt at creating a working Datagrid and having it update to a> database. ... I have> made some fields in the grid editable and want those changes to hit the> database at the same time with an update button that I have at the bottom of> the grid. ... >> Why would you loop through a data grid? ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Please help with a serious issue
    ... be located for updating) they are both invoicing customers that are right ... are updating as well as the previous and next record as sort of a buffer i ... run to a local database and update each night to the server. ... record on a second try because the lock will be removed by the time the user has ...
    (borland.public.delphi.database.ado)
  • Re: Unable to update view in Sql Server 2000
    ... > and database-sql server 2000). ... > party component but I don't think the component is the problem. ... > happening is that I'm updating fields that are part of view. ... So it seems that something in the production database ...
    (comp.databases.ms-sqlserver)
  • Re: How to start a process on the desktop from the Pocket PC?
    ... so nobody responded to my original post probably b/c this has been ... Synchronize the CE database when they place pocket pc in the ... Can I fire the desktop app from my pocket pc app using: ... Do I need to register the app on the ppc? ...
    (microsoft.public.dotnet.framework.compactframework)