Use Apache Calcite to query very slowly?

 ** Use Apache Calcite to query Druid very slowly**




public void groupBy() throws SQLException{
    long start = System.currentTimeMillis();
    Properties connectionProperties = new Properties();
    Connection connection = DriverManager.getConnection(url, connectionProperties);
    ResultSet resultSet = connection.createStatement().executeQuery("SELECT page, SUM(\"count\") AS Edits FROM wikiticker WHERE " +
                                                                        "TIMESTAMP '2016-06-27 00:00:00' <= __time AND __time < TIMESTAMP '2016-06-28 00:00:00' GROUP BY page ORDER BY Edits DESC LIMIT 5");
    while (resultSet.next()){
        LOGGER.info("{} {}",resultSet.getString("page"),resultSet.getString("Edits"));
    }
    LOGGER.info("用时:{}",System.currentTimeMillis()-start);
}
2017-07-11 09:36:45 [main] INFO  Query:54 - Copa América Centenario 29
2017-07-11 09:36:45 [main] INFO  Query:54 - User:Cyde/List of candidates for speedy deletion/Subpage 16
2017-07-11 09:36:45 [main] INFO  Query:54 - Wikipedia:Administrators' noticeboard/Incidents 16
2017-07-11 09:36:45 [main] INFO  Query:54 - 2016 Wimbledon Championships – Men's Singles 15
2017-07-11 09:36:45 [main] INFO  Query:54 - Wikipedia:Administrator intervention against vandalism 15
2017-07-11 09:36:45 [main] INFO  Query:56 - 用时:2035

I bet a lot of that is the connection start-up time. It should be faster than that after the connection has been established and you continue to make more queries on the same connection.