Hi,
I'm getting file (from mainfraim) which has to be imported
into sql server 2000 empty table using bulk insert:
bulk insert database..table
from 'f:\data.dat'
with (
FIELDTERMINATOR = '|',
ROWTERMINATOR = '\n',
CODEPAGE = 'raw'
)
Problem is that file itself has 6GB, and data in the table
after bulk insert is around 10GB. Why is this difference?
Can it be because of the code page?
Thanks,
OJHow are you discerning the size of the table? Are there non-clustered
indexes present?
"OJ" <anonymous@.discussions.microsoft.com> wrote in message
news:1bf9201c45166$b423b6d0$a001280a@.phx
.gbl...
> Hi,
> I'm getting file (from mainfraim) which has to be imported
> into sql server 2000 empty table using bulk insert:
> bulk insert database..table
> from 'f:\data.dat'
> with (
> FIELDTERMINATOR = '|',
> ROWTERMINATOR = '\n',
> CODEPAGE = 'raw'
> )
> Problem is that file itself has 6GB, and data in the table
> after bulk insert is around 10GB. Why is this difference?
> Can it be because of the code page?
> Thanks,
> OJ|||For data size in the table, I'm using sp_spaceused (data
value). It returns accurate values because table is empty
before bulk insert. There aren't any indexes on the table.
>--Original Message--
>How are you discerning the size of the table? Are there
non-clustered
>indexes present?
>
>"OJ" <anonymous@.discussions.microsoft.com> wrote in
message
> news:1bf9201c45166$b423b6d0$a001280a@.phx
.gbl...
imported[vbcol=seagreen]
table[vbcol=seagreen]
difference?[vbcol=seagreen]
>
>.
>|||Can you post DDL for the table? Also, how many rows of data are in the
table after the BULK INSERT?
"OJ" <anonymous@.discussions.microsoft.com> wrote in message
news:1bd1501c45193$d05d14e0$a501280a@.phx
.gbl...[vbcol=seagreen]
> For data size in the table, I'm using sp_spaceused (data
> value). It returns accurate values because table is empty
> before bulk insert. There aren't any indexes on the table.
> non-clustered
> message
> imported
> table
> difference?|||I suggest you read up on page layout, extents and also row layout in SQL Ser
ver. It is possible that not all
pages are full. Also, each row has some overhead as does each page.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"OJ" <anonymous@.discussions.microsoft.com> wrote in message news:1bf9201c45166$b423b6d0$a001
280a@.phx.gbl...
> Hi,
> I'm getting file (from mainfraim) which has to be imported
> into sql server 2000 empty table using bulk insert:
> bulk insert database..table
> from 'f:\data.dat'
> with (
> FIELDTERMINATOR = '|',
> ROWTERMINATOR = '\n',
> CODEPAGE = 'raw'
> )
> Problem is that file itself has 6GB, and data in the table
> after bulk insert is around 10GB. Why is this difference?
> Can it be because of the code page?
> Thanks,
> OJ|||Hi OJ,
Have you run a dbcc showcontig on the table after the bulk insert (see BOL
for details)? I noticed you said that the table has no clustered indexes.
In my experience with bulk insert without a clustered index on the table it
can end up with a lot of unused space after the bulk insert. This might be
what is happening.
Wayne Antinore
"OJ" <anonymous@.discussions.microsoft.com> wrote in message
news:1bd1501c45193$d05d14e0$a501280a@.phx
.gbl...[vbcol=seagreen]
> For data size in the table, I'm using sp_spaceused (data
> value). It returns accurate values because table is empty
> before bulk insert. There aren't any indexes on the table.
> non-clustered
> message
> imported
> table
> difference?
No comments:
Post a Comment