![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
Hi, I'm trying to export and import one big table in sql server 2000 using bcp. Original table has 7,416,000 rows, and after I bcp out this table into file in native format, and bcp in from this file, also in native format, table gets 7,478,000 rows and the data takes significantly less space than before! This table has char, varchar, numeric, datetime, and text data types. Can anybody tell me why the difference? Thanks, OJ |
#3
| |||
| |||
|
|
-----Original Message----- Hi, Significatly less space:- ------------------------- This is because your source table is fragmented heavily. The fragmentation can be viwed by DBCC SHOWCONTIG (Reger books online for info) command. By using this command see the scan density, if the scan density is too low than execute a DBCC DBREINDEX (Refer books online for usage and info) command to remove the fragmention. Cause for the fragmentation is because of the DML commands (Insert, Update and Delete). Row Difference:- ----------------- This may be bause of the inconsistency in sysindexes table. Execute the below command to correct the inconsistency and give the correct rows in the table. (Use the source table_name) USE <dbname go sp_spaceused <table_name>,@updateusage = 'TRUE' -- Thanks Hari MCDBA "OJ" <anonymous (AT) discussions (DOT) microsoft.com> wrote in message news:1b69d01c45082$2712ca90$a301280a (AT) phx (DOT) gbl... Hi, I'm trying to export and import one big table in sql server 2000 using bcp. Original table has 7,416,000 rows, and after I bcp out this table into file in native format, and bcp in from this file, also in native format, table gets 7,478,000 rows and the data takes significantly less space than before! This table has char, varchar, numeric, datetime, and text data types. Can anybody tell me why the difference? Thanks, OJ . |
#4
| |||
| |||
|
|
Table is not fragmented at all. It is rebuilt before bcp out. Statistics are also updated because of rebuilding the table (clustered index with fillfactor 100)... |
![]() |
| Thread Tools | |
| Display Modes | |
| |