----------------------------------------------------------------------------
---- 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!