diff --git a/docs/modules/ROOT/images/sql_and_scan_query_perf_comp.png b/docs/modules/ROOT/images/sql_and_scan_query_perf_comp.png index cbec8d34d..bdd6e58ea 100644 Binary files a/docs/modules/ROOT/images/sql_and_scan_query_perf_comp.png and b/docs/modules/ROOT/images/sql_and_scan_query_perf_comp.png differ diff --git a/docs/modules/ROOT/pages/performance/sql_and_scan_query_pref_comp.adoc b/docs/modules/ROOT/pages/performance/sql_and_scan_query_perf_comp.adoc similarity index 56% rename from docs/modules/ROOT/pages/performance/sql_and_scan_query_pref_comp.adoc rename to docs/modules/ROOT/pages/performance/sql_and_scan_query_perf_comp.adoc index eabce1bcb..2db9c01df 100644 --- a/docs/modules/ROOT/pages/performance/sql_and_scan_query_pref_comp.adoc +++ b/docs/modules/ROOT/pages/performance/sql_and_scan_query_perf_comp.adoc @@ -13,13 +13,15 @@ Ignite supports secondary keys, called QuerySqlFields which will use a tradional This report is about comparing the performance of the queries on non-key fields using Ignite's SCAN query and through SQL queries. == Test setup +All times are in micro seconds. Time axis (y) in the histogram is in logscale. + Operations are on NodeInfo object. Benchmark tool, DPM, NCM and NMM run on the same physical machine in the lab. Ignite is run on two different physical machines in the lab (partitioned). -Number of entries in both SQL and Scan are 1M, 1000 entries are queried on. -The first query always takes way too much time compared to the subsequent -ones and hence ignored when computing the statistics. +Number of entries in both SQL and Scan are 1M. -All times are in micro seconds. Time axis (y) in the histogram is in logscale. +1000 queries are run but the performance statistics are only for 999 +queries, ignoring the first one which always takes orders of +magnitude longer. SQL_QUERY_EXEC time represents time required to execute the SQLFieldsQuery (cache.query() API). @@ -33,19 +35,23 @@ instantiation, cache.withKeepBinary().query(...) SCAN_CURSOR_FETCH time represents time required to extract the result from result set (cursor, cursor.getAll() API). -For Insert operation, MAX represents total time to insert 1M entires into the cache and AVG represents the average time to insert one single entry. All other statistcs for Insert are not relevant and are shown as zero. +Total time is applicable only to insert operations therefore query execution +and fetch times show "N/A" for these operations. + +For Insert operation, only total time for million insertions and average for +signle insert is relevant therefore other times are set to "N/A" (Not +Applicable). == Results |=== -|OPERATION TYPE| MIN| MAX| AVG| MEDIAN| MODE| P99 -|SQL_QUERY_EXEC| 1.0000| 16.0000| 1.8739| 1.0000| 1.0000| 1.0000 -|SCAN_QUERY_EXEC| 530182.0000| 785735.0000| 561550.7678| 552705.0000| 543704.0000| 531308.3565 -|SQL_CURSOR_FETCH| 0.0000| 1.0000| 0.6717| 1.0000| 1.0000| 0.0000 -|SCAN_CURSOR_FETCH| 0.0000 | 8.0000 | 0.1411| 0.0000| 0.0000| 0.0000 -|SQL_INSERT| 0.0000 | 929676278.00| 929.6762| 0.0| 0.0| 0.0 -|SCAN_INSERT| 0.0000| 812451365.00| 812.4514| 0.0| 0.0| 0.0 +|OPERATION_TYPE|MIN |MAX |AVG |TOTAL |MEDIAN |MODE |P99 +|SQL_EXEC | 1.0000| 16.0000| 1.8739|N/A | 1.0000| 1.0000| 7.0000 +|SCAN_EXEC |530,182.0000|785,735.0000|561,550.0000|N/A |552,705.0000|543,704.0000|667,240.0000 +|SQL_FECTH | 0.0000| 3.0000| 0.7537|N/A | 1.0000| 1.0000| 1.0000 +|SCAN_FETCH | 0.0000| 8.0000| 0.1411|N/A | 0.0000| 0.0000| 3.0000 +|SQL_INSERT | 0.0000|N/A | 929.6800|929,676,278.0000|N/A |N/A |N/A +|SCAN_INSERT | 0.0000|N/A | 812.4500|812,451,365.0000|N/A |N/A |N/A |=== == Plot of the results image::sql_and_scan_query_perf_comp.png[] - diff --git a/docs/modules/ROOT/pages/performance/sql_and_scan_query_perf_comp.csv b/docs/modules/ROOT/pages/performance/sql_and_scan_query_perf_comp.csv index de57d57fc..0d52f6cba 100644 --- a/docs/modules/ROOT/pages/performance/sql_and_scan_query_perf_comp.csv +++ b/docs/modules/ROOT/pages/performance/sql_and_scan_query_perf_comp.csv @@ -1,7 +1,7 @@ -OPERATION TYPE MIN MAX AVG MEDIAN MODE P99 -SQL_QUERY_EXEC 1.0000 16.0000 1.8739 1.0000 1.0000 1.0000 -SCAN_QUERY_EXEC 530182.0000 785735.0000 561550.7678 552705.0000 543704.0000 531308.3565 -SQL_CURSOR_FETCH 0.0000 1.0000 0.6717 1.0000 1.0000 0.0000 -SCAN_CURSOR_FETCH 0.0000 8.0000 0.1411 0.0000 0.0000 0.0000 -SQL_INSERT 0.0000 929676278.00 929.676278 0.0 0.0 0.0 -SCAN_INSERT 0.0000 812451365.00 812.451365 0.0 0.0 0.0 +OPERATION_TYPE MIN MAX AVG TOTAL MEDIAN MODE P99 +SQL_EXEC 1.0000 16.0000 1.8739 N/A 1.0000 1.0000 7.0000 +SCAN_EXEC 530182.0000 785735.0000 561550.0000 N/A 552705.0000 543704.0000 667240.0000 +SQL_FECTH 0.0000 3.0000 0.7537 N/A 1.0000 1.0000 1.0000 +SCAN_FETCH 0.0000 8.0000 0.1411 N/A 0.0000 0.0000 3.0000 +SQL_INSERT 0.0000 N/A 929.6800 929676278.0000 N/A N/A N/A +SCAN_INSERT 0.0000 N/A 812.4500 812451365.0000 N/A N/A N/A diff --git a/scripts/sql_and_scan_query_perf_comp.gps b/scripts/sql_and_scan_query_perf_comp.gps index e63b95324..f80af34ae 100644 --- a/scripts/sql_and_scan_query_perf_comp.gps +++ b/scripts/sql_and_scan_query_perf_comp.gps @@ -3,8 +3,9 @@ set output 'sql_and_scan_query_perf_comp.png' set style fill solid 1.00 border lt -1 set key fixed right top vertical Right noreverse noenhanced autotitle nobox set style histogram clustered gap 1 title textcolor lt -1 -set datafile missing '-' -# set datafile separator "|" +set datafile missing 'N/A' +set decimalsign locale +set decimalsign "." set grid show grid set style data histograms @@ -18,4 +19,4 @@ set ylabel "Time in Micro seconds" set logscale y NO_ANIMATION=1 -plot newhistogram "", 'sql_and_scan_query_perf_comp.csv' using 2:xtic(1) ti "min", '' u 3:xtic(1) ti "max", '' u 4:xtic(1) ti "avg", '' u 5:xtic(1) ti "median", '' u 6:xtic(1) ti "P95", '' u 7:xtic(1) ti "P99" +plot newhistogram "", 'sql_and_scan_query_perf_comp.csv' using 2:xtic(1) ti "min", '' u 3:xtic(1) ti "max", '' u 4:xtic(1) ti "avg", '' u 5:xtic(1) ti "total", '' u 6:xtic(1) ti "median", '' u 7:xtic(1) ti "P99"