15.00 - Period Data Types - Teradata Database

Teradata Database Design

prodname
Teradata Database
vrm_release
15.00
category
User Guide
featnum
B035-1094-015K

Period Data Types

The following table indicates the alignment requirements for each of the Period data types and their respective sizes on aligned row format platforms. When the size of the stored value for a type differs for packed64 and aligned row format platforms, the differing table cells are shaded.

 

                                     Data Type

 

  Packed64  Size (bytes)

       64‑Bit
 Aligned Row
   Size (bytes)

    Allocated Aligned Row
  Size (bytes)

PERIOD (DATE)

          8

            2

           8

PERIOD (TIME(n))

        12

            2

         16

PERIOD (TIME(n) WITH TIME ZONE)

        16

            2

         16

PERIOD (TIMESTAMP(n))

        20

            2

         24

PERIOD (TIMESTAMP(n) WITH TIME ZONE)

        24

            2

         24

 

PERIOD (DATE): 8 Bytes (All Platforms)

                            Beginning Date

                              Ending Date

AD January 1, 1 — AD December 30, 9999

AD January 2, 1 — AD December 31, 9999

 

PERIOD (TIME (Precision)):   12 Bytes (Packed64 Platforms)

                                                 16 Bytes (Aligned Row Platforms)

Beginning Time (6 bytes - Packed64 Platforms)

                             8 bytes - Aligned Row Platforms)

Ending Time (6 bytes - Packed64 Platforms)

                        8 bytes - Aligned Row Platforms)

        Hour

       Minute

     Seconds

       Hour

       Minute

     Seconds

hh:mi:ss[.ssssss]

hh:mi:ss[.ssssss]

 

PERIOD (TIME (Precision) WITH TIME ZONE): 16 Bytes (All Platforms)

                        Beginning Time With Time Zone (8 bytes)

                                 Ending Time With Time Zone (8 bytes)

Hour

Minute

Second

Timezone_Hour

Timezone_Minute

Hour

Minute

Second

Timezone_Hour

Timezone_Minute

hh:mi:ss.ssssss±hh:mi

hh:mi:ss.ssssss±hh:mi

 

PERIOD (TIMESTAMP (Precision) ):20 Bytes (All Platforms)

                     Beginning Time Stamp (10 bytes)

                     Ending Time Stamp (10 bytes)

Year

Month

Day

Hour

Minute

Second

Year

Month

Day

Hour

Minute

Second

yyy-mm-dd hh:mi:ss

yyy-mm-dd hh:mi:ss

 

PERIOD (TIMESTAMP (Precision) ) When Ending Element Value is UNTIL_CHANGED:11 Bytes (All Platforms)

                      Beginning Time Stamp (10 bytes)

           Ending Time Stamp (1 byte)

Year

Month

Day

Hour

Minute

Second

UNTIL_CHANGED

yyy-mm-dd hh:mi:ss

uc

 

PERIOD (TIMESTAMP (Precision) WITH TIME ZONE): 24 Bytes (All Platforms)

                      Beginning Timestamp With Time Zone (12 bytes)

                         Ending Timestamp With Time Zone (12 bytes)

Year

Month

Day

Hour

Minute

Second

Timezone_
Hour

Timezone_
Minute

Year

Month

Day

Hour

Minute

Second

Timezone_
Hour

Timezone_
Minute

yyyy-mm-dd hh:mi:ss±hh:mi

yyyy-mm-dd hh:mi:ss±hh:mi

 

PERIOD (TIMESTAMP (Precision) WITH TIME ZONE) When Ending Element Value is UNTIL_CHANGED: 13 Bytes (All Platforms)

                               Beginning Timestamp With Time Zone (12 bytes)

  Ending Timestamp With Time Zone (1 byte)

Year

Month

Day

Hour

Minute

Second

Timezone_
Hour

Timezone_
Minute

UNTIL_CHANGED

yyyy-mm-dd hh:mi:ss±hh:mi

uc