Analyze the internal data structure of the ASA database (1)

Source: Internet
Author: User
Tags sybase

----------------------------------------------------------------------------

---- This is andkylee's personal originality. Please repost it with respect to the author's Labor achievements;

---- The original source must be specified for reprinting.
:
Http://blog.csdn.net/andkylee

---- Keywords: ASA internal data structure analysis PES ypes internals physical storage

----------------------------------------------------------------------------

 

The internal data structure of the Sybase Anywhere Database has been analyzed since yesterday.

We already know how the data in each row is stored, and how to store variable and fixed-length columns. In particular, it shows how datatime data is stored.

 

The data structure of the ASA database is much simpler than that of the ASE database. Each row has two bytes of data in the header, indicating the total number of bytes of data in the row. Data in a variable-length column contains data that represents the variable-length field. No column Offset Table exists in each row of data.

 

The fields not analyzed are: Row Offset Table and page header information! Continue to work!

 

Here we will talk about the datetime type in Asa and ase. The datetime storage range in ASA is much wider than that in ase.

 

The following is the minimum date range found When iSQL is connected under ASE:1753-01-01 00:00:00

1> select datediff (DD, '2017-01-01 00:00:00 ', '2017-01-19 13:00:00 ')
2> go

-----------
93885

(1 row affected)
1> select datediff (DD, '2017-12-31 00:00:00 ', '2017-01-19 13:00:00 ')
2> go
MSG 247, level 16, state 1:
Server 'test', line 1:
Arithmetic overflow during implicit conversion of varchar value' 1752-12-31
00:00:00 'To A datetime field.
========================================================== ======================================

 

In ASA, 0001-01-01 00:00:00 can be stored in the database.

The difference in the scope of the two makes the data structures of the two in the database different.

 

To ensure that the datetime type in ASE is accurate to 1/300 seconds, but that in ASA is accurate to 1 millisecond?

I don't think Sybase's performance will slow down the computing speed and affect the performance of the entire database?

 

Continue analysis later!

 

 

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.