You might want to review these tips and make adjustments to increase your Presto queries performance.
Always use TD_TIME_RANGE or TD_INTERVAL (with a link to Scheduling Presto Queries)
Avoid using slow memory consuming operators such as
For example, instead of using COUNT (DISTINCT x), use approx_distinct(x).
Tables should be joined in the order of a larger table to smaller tables.
Using a non-equi join condition slows down the query processing.
Columnar storage characteristics
Choosing too many columns slows down query processing.
Query result size
Generating too many rows takes time. Instead, use CREATE TABLE AS … or INSERT INTO or result_redirect magic comment.