[
https://issues.apache.org/jira/browse/IGNITE-3959?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15516127#comment-15516127
]
Andrew Mashenkov edited comment on IGNITE-3959 at 9/23/16 11:04 AM:
--------------------------------------------------------------------
See IgniteH2Indexing.wrap() method. We use ValueDate\ValueTime classes provided
by H2 for building H2 objects.
These classes uses java.util.Calendar which causes well known issues. [Details
can be found in this and related articles|
http://java-performance.info/jsr-310-java-8-datetime-library-performance-well-joda-time-2-3-j-u-calendar/].
We can replace ValueDate\ValueTime classes with own implementation depending on
H2 internals (see H2 class method DateTimeUtils.dateValueFromCalendar). Then
we'll must bother about compatibility with other H2 versions.
In H2 version we use, holds cache java.util.Calendar instance in static field
and synchronize every operation on it.
We can make a pool of Calendar instances to improve performance in multi-thread
environments or replace java.util.Calendar.
JodaTime library seems to be a good alternative to java.util.Calendar, but it
is an external dependency and futhermore it must be updated along with JDK TZ
Info updates.
was (Author: amashenkov):
See IgniteH2Indexing.wrap() method. We use ValueDate\ValueTime classes provided
by H2 for building H2 objects.
These classes uses java.util.Calendar which causes well known issues. [Details
can be found in this and related articles|
http://java-performance.info/jsr-310-java-8-datetime-library-performance-well-joda-time-2-3-j-u-calendar/].
We can replace ValueDate\ValueTime classes with our classes with own
implementation depending on H2 internals (see H2 class method
DateTimeUtils.dateValueFromCalendar). Then we'll must bother about
compatibility with other H2 versions.
In H2 version we use, holds cache java.util.Calendar instance in static field
and synchronize every operation on it.
We can make a pool of Calendar instances to improve performance in multi-thread
environments or replace java.util.Calendar.
JodaTime library seems to be a good alternative to java.util.Calendar, but it
is an external dependency and futhermore it must be updated along with JDK TZ
Info updates.
> SQL Dates performance issues
> ----------------------------
>
> Key: IGNITE-3959
> URL: https://issues.apache.org/jira/browse/IGNITE-3959
> Project: Ignite
> Issue Type: Improvement
> Components: SQL
> Affects Versions: 1.6, 1.7
> Reporter: Andrew Mashenkov
> Labels: performance
>
> SqlFieldsQueries slowdown on date\time fields processing due to ineffective
> java.util.Calendar usage for date manipulation by H2 database.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)