V
V
Venya Babiyman2019-06-18 03:51:45
MySQL
Venya Babiyman, 2019-06-18 03:51:45

Why do PostgreSQL and MySQL date accuracy only to microseconds?

Date storage accuracy in different relational databases is different:

+--------------+-------------------------------+----------------+
| Oracle       | 2001-01-01 23:59:59:999999999 | наносекунда    |
| MSSQL        | 2001-01-01 23:59:59:9999999   | сто наносекунд |
| MySQL        | 2001-01-01 23:59:59:999999    | микросекунда   |
| PostgreSQL   | 2001-01-01 23:59:59:999999    | микросекунда   |
+--------------+-------------------------------+----------------+

What prevents MSSQL, MySQL, PostgreSQL from maintaining date accuracy up to nanoseconds, like Oracle?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
P
Peter, 2019-06-18
@petermzg

Increased accuracy requires increased resource costs.
For most users, such accuracy is not needed, and if the need arises, then it can be implemented in an alternative way, for example, by storing these extra values ​​in a separate table field.

J
jcmvbkbc, 2019-06-18
@jcmvbkbc

What prevents MSSQL from maintaining nanosecond date precision

The fact that in Windows all the built-in timestamps have an accuracy of 100ns. Because the FILETIME data format is an integer number of hundreds of nanoseconds since the year 1601.

G
GamaleyVV, 2019-06-19
@GamaleyVV

In Delphi, the normal solution is the integer part: Years from where, the fractional part Time - according to the Delphic concepts Float. How exactly...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question