ADA-C01 · Question #87
An organization's sales team leverages this Snowflake query a few times a day: SELECT CUSTOMER ID, CUSTOMER_NAME, ADDRESS, PHONE NO FROM CUSTOMERS WHERE LAST UPDATED BETWEEN TO_DATE…
The correct answer is D. Leverage the CURRENT_DATE function for date calculations. According to the web search results from my predefined tool search_web, one of the factors that affects the reuse of persisted query results is the exact match of the query syntax. If the query contains functions that return different values for successive runs, such as…
Question
An organization's sales team leverages this Snowflake query a few times a day:
SELECT CUSTOMER ID, CUSTOMER_NAME, ADDRESS, PHONE NO FROM CUSTOMERS WHERE LAST UPDATED BETWEEN TO_DATE (CURRENT_TIMESTAMP) AND (TO_DATE (CURRENT_TIMESTAMP) -7); What can the Snowflake Administrator do to optimize the use of persisted query results whenever possible?
Options
- AWrap the query in a User-Defined Function (UDF) to match syntax execution.
- BAssign everyone on the sales team to the same virtual warehouse.
- CAssign everyone on the sales team to the same security role.
- DLeverage the CURRENT_DATE function for date calculations.
How the community answered
(53 responses)- A4% (2)
- B6% (3)
- C13% (7)
- D77% (41)
Explanation
According to the web search results from my predefined tool search_web, one of the factors that affects the reuse of persisted query results is the exact match of the query syntax. If the query contains functions that return different values for successive runs, such as CURRENT_TIMESTAMP, then the query will not match the previous query and will not benefit from the cache. To avoid this, the query should use functions that return consistent values for the same day, such as CURRENT_DATE, which returns the current date without the time
Topics
Community Discussion
No community discussion yet for this question.