
Take into account basic recommendations during data modeling and optimizations like affinity collocation, secondary indexes and others listed here. Have a multi-nodes cluster deployed with a whole copy of data in RAM. Don't try to compare a single-node Ignite cluster to a relational database that was optimized for such configurations.
Ignite SQL engine is optimized for multi-nodes deployments with the RAM as primary storage.There are several things to consider when Ignite is compared to a relational database: Long endGetResult = System.currentTimeMillis() Long endPrepTable = System.currentTimeMillis() IgniteConfiguration configuration = new IgniteConfiguration() Ĭonn = DriverManager.getConnection("jdbc:ignite:thin://127.0.0.1/") Public static void main(String args) throws SQLException, ClassNotFoundException Private static void retrieveResultSet() throws SQLExceptionįor(int i=0 iAVG(UNIT_PRICE) AS AVG_UNIT_PRICE, MAX(UNITS_SOLD) AS MAX_UNITS_SOLD, SUM(UNIT_COST) AS SUM_UNIT_COST, AVG(TOTAL_REVENUE) AS AVG_TOTAL_REVENUE, AVG(TOTAL_COST) AS AVG_TOTAL_COST, AVG(TOTAL_PROFIT) as AVG_TOTAL_PROFIT FROM PIVOT_TEST GROUP BY COUNTRY ") Private static void getResult() throws ClassNotFoundException, SQLException Stmt = conn.prepareStatement("CREATE INDEX index_name ON PIVOT_TEST(COUNTRY)") "INTO PIVOT_TEST (REGION, COUNTRY, ITEM_TYPE, SALES_CHANNEL, ORDER_PRIORITY, ORDER_DATE, ORDER_ID, SHIP_DATE, UNITS_SOLD, UNIT_PRICE, UNIT_COST, TOTAL_REVENUE, TOTAL_COST, TOTAL_PROFIT ) FORMAT CSV") Private static void fill() throws ClassNotFoundException, SQLExceptionĬonn.prepareStatement("COPY FROM 'LINK_TO_CSV_FILE'" + + "SHIP_DATE VARCHAR, UNITS_SOLD NUMERIC, UNIT_PRICE NUMERIC, UNIT_COST NUMERIC, TOTAL_REVENUE NUMERIC, TOTAL_COST NUMERIC, TOTAL_PROFIT NUMERIC )") " REGION VARCHAR, COUNTRY VARCHAR, ITEM_TYPE VARCHAR, SALES_CHANNEL VARCHAR, ORDER_PRIORITY VARCHAR, ORDER_DATE VARCHAR, ORDER_ID VARCHAR PRIMARY KEY, " Stmt.executeUpdate("CREATE TABLE PIVOT_TEST (" + Private static void initialize() throws ClassNotFoundException, SQLExceptionĬlass.forName("") Here is the source-code I used in my example: private static Connection conn = null Is that true? Why is it that slow in my example?Ģ, Did I use Apache Ignite in a wrong way or are there some additional tuning options that I should use? Interestingly and unexpected, MS SQL-Server need about 0.25 seconds to perform this operations, while it takes 1-2 seconds with Apache Ignite.ġ, I always was under the impression that Apache Ignite is not only a good option for distributed computing, but also leads to a performance gain compared to a conventional relational database due to its memory oriented architecture.
Previously, I also used the same data to do some performance-tests with MS SQL-Server. So as a (very primitive) example, I filled Apache Ignite with 250.000 records from a csv-file (14 columns) and did some group-by operations. We are considering using an In-Memory database (such as Apache Ignite) to deal with performance intense BI-like operations.