ignite-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andrew Mashenkov (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (IGNITE-3959) SQL Dates performance issues
Date Fri, 23 Sep 2016 11:03:20 GMT

    [ https://issues.apache.org/jira/browse/IGNITE-3959?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15516127#comment-15516127

Andrew Mashenkov commented on IGNITE-3959:

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

View raw message