DATETIME(6) vs TIMESTAMP(6)

Hi Experts,

Which one of the above mentioned datatype would be advisable while storing a datetime value in DB and what will be the advantage of one over other while using it in APPIAN.

Thanks,

Gaurav Singh

  Discussion posts and replies are publicly visible

Parents Reply Children
  • 0
    A Score Level 2
    in reply to Dave Lewis

    Hi Dave,

    This is the actual reason why I'm looking for the difference.

    Our legacy application is utilizing oracle DB and using timestamp(6) field, while when we are migrating the data to cloud Maria DB so as to decommission the old system and database we are getting error while writing the data in MariaDB.

    There are multiple values which are set to 1970-01-01 00-00-00 000000 and they all are getting failed.

    As a workaround I though to use Datetime(6) field but got to know that timestamp takes 4 byte while datetime takes 8 byte, so wanted to know if moving the data from timestamp(6) to datetime(6) will make any update to data or not and also if querying such data will have any impact on record/Query performance.

  • 0
    Certified Lead Developer
    in reply to GauravSingh

    Maria DB Datetime can go to within a microsecond of 10,000 CE, and minimum value of 1/1/1000, 66 years before the battle of Hastings.  These are both further than the limits of Appian, which doesn't get you too far into the past beyond the Declaration of Independence, but it should be all you need for now.

    mariadb.com/.../