This paper analyzes why the Sybase data space is so large.
Hardware environment: win2k+sybase12.5.2
Specific actions:
My table SQL is as follows:
CREATE TABLE PHONE_INFO
(
PHONENO CHAR(8) NOT NULL ,
TYPE CHAR(1),
PRIMARY KEY (PHONENO)
)
go
To import 500W data, the original text file has only 61MB
For example:
88888888|1|
........
Problem: After the import found that occupy space grew very large, the original backup is only about 500MB, but now back up the file is 4.5GB.
Workaround One:
Whether the table is a row lock, you can use DBCC reorg to reclaim space, rather than the defragmentation of Windows.
Workaround Two:
Test first:
sp_spaceused
go
sp_spaceused PHONE_INFO
go
See if it's all the space in the table? What other watches are there in this library?
Workaround Three:
insert into TEMP_PHONE_INFO
SELECT * FROM PHONE_INFO
GO
sp_rename TEMP_PHONE_INFO,PHONE_INFO