Re: huge log file when inserting data
From: donald (donald.huppe_at_bocenor.com)
Date: 03/31/04
- Next message: Josh: "Triggers on Insert, Delete"
- Previous message: Francisco Castillo: "dbo permissions"
- In reply to: DHatheway: "Re: huge log file when inserting data"
- Next in thread: Andrew J. Kelly: "Re: huge log file when inserting data"
- Reply: Andrew J. Kelly: "Re: huge log file when inserting data"
- Messages sorted by: [ date ] [ thread ]
Date: Wed, 31 Mar 2004 13:43:01 -0800
Thanks for the answer
Before the insert, the table is empty. And the log also.
After the insert (1060253 rows) the table is 394696 KB wide
(reserved)
Nothing else is running on the database. No trigger.
The insert is in a transaction and it is committed.
I tried 3 times and the log is always about 1.7 GIG.
thanks
Don
>-----Original Message-----
>The entire million rows will be sent to the log and the
statement must end
>(or the transaction must be committed if you're using a
transaction) before
>any of the space used to log the million row insert can
be released.
>
>How big (i.e., how many bytes wide) are the records you
are inserting? Are
>they about 1700 bytes wide?
>
>1 million rows X 1700 bytes/row = 1.7 billion bytes.
>
>Of course, there's some other overhead in logging, so a
million records a
>little smaller than 1700 bytes would also give you 1.7GB
of log usage.
>
>What else is going on while you're running your insert?
If your insert
>involves only, say, 700MB of data but other processes are
running that
>insert or update another 1GB of data during that time,
the amount of space
>required is added together.
>
>Are you inserting records to a table that involves a
trigger? Trigger
>actions that change the database must be logged, too, and
add to your log
>space requirements.
>
>
>"donald" <donald.huppe@bocenor.com> wrote in message
>news:16bc601c41752$15c9a470$a101280a@phx.gbl...
>>
>> >-----Original Message-----
>> >Maybe you can shrink the fil......
>> >.
>> >
>>
>> My question is :
>>
>> I would like to know if it's normal that the log become
>> this big.
>>
>> And why am i not able to shring it, except with the
detach
>> database solution
>
>
>.
>
- Next message: Josh: "Triggers on Insert, Delete"
- Previous message: Francisco Castillo: "dbo permissions"
- In reply to: DHatheway: "Re: huge log file when inserting data"
- Next in thread: Andrew J. Kelly: "Re: huge log file when inserting data"
- Reply: Andrew J. Kelly: "Re: huge log file when inserting data"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|