Replies: 1 comment
-
Your database might have some caching mechanism internally. And in some cases when we use function related to date time like TO_TIMESTAMP caching is not considered. But when you pass the date in as it is then first time runs query but second time it might return result from cache. Please check if this is the case. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello, I have a question about optimizing a SQL query that is built for a chart in Explore view.
If I use time range filter, I get the following SQL statement:
This query takes about 3 minutes to complete.
But if I modify the WHERE clause (in SQL Lab), I get the same result much faster:
This query takes about 3 seconds to complete.
Is it possible to configure the chart to work with this faster variant?
Why is the
TO_TIMESTAMP(…)
variant so much slower?Thanks.
Beta Was this translation helpful? Give feedback.
All reactions