When i start long query in mongodb a receive this message:
Query was cancelled because planning time exceeded 60 seconds
This is my query:
SELECT msg_id, hours, nested_4.hours.data_hour AS dataTime, dt_end, dt_start, dt_upd, etso, event_status, last, tipo, unaviable_capacity, zona
FROM (
SELECT msg_id, hours, dt_end, dt_start, dt_upd, etso, event_status, last, tipo, unaviable_capacity, zona
FROM (
SELECT msg_id, days, hours, nested_2.hours.last AS hours_last, dt_end, dt_start, dt_upd, etso, event_status, last, tipo, unaviable_capacity, zona
FROM (
SELECT msg_id, days, flatten(nested_1.days.hours) AS hours, dt_end, dt_start, dt_upd, etso, event_status, last, tipo, unaviable_capacity, zona
FROM (
SELECT nested_0.* FROM (
SELECT msg_id, flatten(days) AS days, CAST(“remit_centrali_test_dremio”.“dt_end” AS TIMESTAMP) AS dt_end, CAST(“remit_centrali_test_dremio”.“dt_start” AS TIMESTAMP) AS dt_start, CAST(“remit_centrali_test_dremio”.“dt_upd” AS TIMESTAMP) AS dt_upd, etso, event_status, last, tipo, unaviable_capacity, zona
FROM mongo_test.transmission.remit_centrali_test_dremio AS remit_centrali_test_dremio
WHERE last = 1
) nested_0 WHERE nested_0.days.last = 1
) nested_1
) nested_2
) nested_3
WHERE hours_last = 1
) nested_4
The problem is when i try to extract data_hour from nested_4.hours.
How can i increase the timeout??