Yash Agarwal
07/21/2021, 10:03 AMselect distinct DATETIMECONVERT(transaction_date, '1:DAYS:EPOCH', '1:DAYS:SIMPLE_DATE_FORMAT:yyyy-MM-dd', '1:DAYS') from transactions limit 1000 -- 80+ seconds
select distinct transaction_date from transactions limit 1000 -- 3.5 seconds
Can you help with the how to optimize the same. In the meanwhile we have added another column in the yyyy-MM-dd
format to support the same.Mayank
Yash Agarwal
07/21/2021, 5:46 PMYash Agarwal
07/21/2021, 5:49 PMMayank
Mayank
DATETIMECONVERT(transaction_date, '1:DAYS:EPOCH', '1:DAYS:SIMPLE_DATE_FORMAT:yyyy-MM-dd', '1:DAYS')
to get the distinct values?Mayank
Jackie
07/21/2021, 6:03 PMJackie
07/21/2021, 6:05 PMJackie
07/21/2021, 6:06 PMJackie
07/21/2021, 6:06 PM