Analyze why Sybase's data space is so large

Source: Internet
Author: User
Tags sybase

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.