In case you have your own slow SQL query, you can optimize it automatically here.
For the query above, the following recommendations will be helpful as part of the SQL tuning process.
You'll find 3 sections below:
ALTER TABLE `car_fact_order` ADD INDEX `car_order_idx_dt` (`dt`);
SELECT
tmp_date_distance('2017-12-26 00:00:02.044',
'2017-12-26
00:00:03.045')
FROM
stg.car_fact_order
WHERE
stg.car_fact_order.dt = '2018-01-09' LIMIT 1