DATETIME vs bigint

  • i want to storage datetime as :

    DATETIME 8 bytes

    Or

    bigint 8 Bytes

    both of 8 bytes

    will there be diffrence in the Index size? in performance?

    Thanks

    Peleg

  • If it's a datetime, store it as a datetime. If it's just a date, consider the DATE datatype since you're using 2008.

    That way you get data validation (20100231 being correctly identified as invalid), you don't get all sorts of data conversion problems, and you can use the datetime functions without needing casts and converts everwhere.

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply