Hi @mbaxi,

We ran your query on an empty table using the same DDL and got a response right away on an engineering desktop.

mapdql> SELECT r, m, p, sum(fc) AS fc, (CASE WHEN sum(fc) > 0 Then 1 Else 0 End) AS fwc, (CASE WHEN scs=0 THEN ‘U’ WHEN sc/scs>=0.74 Then ‘R’ El

se ‘U’ End) AS reliable from mytable where (( t = ‘a’ AND m = ‘a_1’ AND p IN (‘p0’,‘p1’,‘p2’,‘p3’,‘p4’,‘p5’,‘p6’,‘p7’,‘p8’,‘p9’,‘p10’,‘p11’)) OR

( t = ‘a’ AND m = ‘a_2’ AND p IN (‘p0’,‘p1’,‘p2’,‘p3’,‘p4’,‘p5’,‘p6’,‘p7’,‘p8’,‘p9’,‘p10’,‘p11’)) OR ( t = ‘a’ AND m = ‘a_3’ AND p IN (‘p0’,‘p1

‘,‘p2’,‘p3’,‘p4’,‘p5’,‘p6’,‘p7’,‘p8’,‘p9’,‘p10’,‘p11’)) OR ( t = ‘a’ AND m = ‘a_4’ AND p IN (‘p0’,‘p1’,‘p2’,‘p3’,‘p4’,‘p5’,‘p6’,‘p7’,‘p8’,‘p9’,’

p10’,‘p11’)) OR ( t = ‘a’ AND m = ‘a_5’ AND p IN (‘p0’,‘p1’,‘p2’,‘p3’,‘p4’,‘p5’,‘p6’,‘p7’,‘p8’,‘p9’,‘p10’,‘p11’)) OR ( t = ‘a’ AND m = ‘a_6’ AND

p IN (‘p0’,‘p1’,‘p2’,‘p3’,‘p4’,‘p5’,‘p6’,‘p7’,‘p8’,‘p9’,‘p10’,‘p11’))) AND end_date = ‘2018-06-06’ AND ft =‘W’ GROUP BY r, m, p, reliable;

No rows returned.

Execution time: 6031 ms, Total time: 6038 ms

mapdql> SELECT r, m, p, sum(fc) AS fc, (CASE WHEN sum(fc) > 0 Then 1 Else 0 End) AS fwc, (CASE WHEN scs=0 THEN ‘U’ WHEN sc/scs>=0.74 Then ‘R’ Else ‘U’ End) AS reliable from mytable where (( t = ‘a’ AND m = ‘a_1’ AND p IN (‘p0’,‘p1’,‘p2’,‘p3’,‘p4’,‘p5’,‘p6’,‘p7’,‘p8’,‘p9’,‘p10’,‘p11’)) OR ( t = ‘a’ AND m = ‘a_2’ AND p IN (‘p0’,‘p1’,‘p2’,‘p3’,‘p4’,‘p5’,‘p6’,‘p7’,‘p8’,‘p9’,‘p10’,‘p11’)) OR ( t = ‘a’ AND m = ‘a_3’ AND p IN (‘p0’,‘p1’,‘p2’,‘p3’,‘p4’,‘p5’,‘p6’,‘p7’,‘p8’,‘p9’,‘p10’,‘p11’)) OR ( t = ‘a’ AND m = ‘a_4’ AND p IN (‘p0’,‘p1’,‘p2’,‘p3’,‘p4’,‘p5’,‘p6’,‘p7’,‘p8’,‘p9’,‘p10’,‘p11’)) OR ( t = ‘a’ AND m = ‘a_5’ AND p IN (‘p0’,‘p1’,‘p2’,‘p3’,‘p4’,‘p5’,‘p6’,‘p7’,‘p8’,‘p9’,‘p10’,‘p11’)) OR ( t = ‘a’ AND m = ‘a_6’ AND p IN (‘p0’,‘p1’,‘p2’,‘p3’,‘p4’,‘p5’,‘p6’,‘p7’,‘p8’,‘p9’,‘p10’,‘p11’))) AND end_date = ‘2018-06-06’ AND ft =‘W’ GROUP BY r, m, p, reliable;

No rows returned.

Execution time: 98 ms, Total time: 106 ms

From the log:

I0725 12:57:47.421281 19389 Catalog.cpp:2643] Instantiating Fragmenter for table mytable took 0ms

I0725 12:57:47.604835 18501 Calcite.cpp:346] Time in Thrift 1 (ms), **Time in Java Calcite server 253 (ms)**

What about other queries, do you see this much delay on the Calcite server?

Regards,

Veda