[
https://issues.apache.org/jira/browse/IGNITE-6383?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Vladimir Ozerov updated IGNITE-6383:
------------------------------------
Labels: performance (was: )
> SQL: review date/time format
> ----------------------------
>
> Key: IGNITE-6383
> URL: https://issues.apache.org/jira/browse/IGNITE-6383
> Project: Ignite
> Issue Type: Task
> Components: sql
> Affects Versions: 2.1
> Reporter: Vladimir Ozerov
> Labels: performance
>
> Currently Ignite stores date as {{long}} and timestamp as {{long + int}}.
> This is rather compact form, however it is extremely inefficient for SQL
> operations requirind date parts, such as {{DAYOFF(...)}}. Moreover, it
> require costly conversions between {{long}} and {{java.util.Date}}.
> Probably we should review our date-time format. E.g. this is how Oracle
> format looks like (thanks to [[email protected]]):
> {code}
> timestamp '2015-07-31 08:55:06.157047'
> Typ=180 Len=11: 120,115,7,31,9,56,7,9,92,88,216
> Century: 120-100 = 20 centuries
> Year : 115-100 = 15 year in the 20th century
> Month: 7
> Day:31
> Hours: 9-1 =8
> minutes: 56 -1 = 55
> Seconds: 07 -1 = 06
> Fractions: 09,92,88,216 (dec) -> 09,5C,58,D8 (hex) = 0x095C58D8 -> 157047000
> -> 0.157047
> {code}
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)