[MDEV-18843] Nanoseconds in MariaDB Created: 2019-03-07 Updated: 2023-03-28 |
|
| Status: | Open |
| Project: | MariaDB Server |
| Component/s: | Data types |
| Fix Version/s: | None |
| Type: | Task | Priority: | Major |
| Reporter: | Pramod Mahto | Assignee: | Unassigned |
| Resolution: | Unresolved | Votes: | 1 |
| Labels: | timestamp | ||
| Issue Links: |
|
||||||||||||||||
| Description |
|
Nanoseconds in MariaDB https://mariadb.com/kb/en/library/microseconds-in-mariadb/
Nanoseconds in MariaDB It ranges from 0 to 9, meaning that we can use the TIMESTAMP data type to store up to nanosecond. Currently MariaDB support fractional seconds precision sets to microsecond.
For example :- I have two timestamps i.e. start= 15-03-11 15:10:10 and finish=15-03-11 15:10:10 and i need to subtract them ("finish-start" ) in order to find the duration. Because their difference is in nanosecond level, I need to have them into 15:10:10.000000001 and 15:10:10.000000015 respectively.
|
| Comments |
| Comment by Alexander Barkov [ 2019-03-15 ] |
|
Time estimation for the work needed. Server sideAdding second precision 6..9 to the server side will include:
Client-server protocol and Connector-C: – 10 days
Note, similar changes will be needed in all connectors (ODBC, Java, PHP, Perl, etc) Open questionsThere is a also a problem that some operating systems do not provide clocks with nanosecond precision, so things like CURRENT_TIMESTAMP(9) won't be available on these operating systems. We'll perhaps have to zero-pad nanoseconds on these platforms. SummaryCollecting all together: 50 man-days (~10 man-weeks) |