2
votes

I have a questions regarding the Result Cache. In one of the snowflake documentation, It is given that to use the Result cache the Role has to be same even though Users are different. However when i tried with different Roles and User i was still able to access the Result Cache, Can you confirm my understanding - Any Roles that has access to the Object can reuse the result Cache though it is not same.

My Experiment:

User 1 with Role1 executed - select * from emp;

User 2 with Role2 executed the same query - select * from emp; It used fetched the result from Cache without using the Virtual Warehouse.

enter image description here

2

2 Answers

1
votes

Per the Snowflake documentation, https://docs.snowflake.com/en/user-guide/querying-persisted-results.html#retrieval-optimization, most queries require that the role accessing result cache must have access to all underlying data that produced the result cache. The one exception noted is the SHOW command result cache can only be accessed using the same role. This may be the cause for the exception noted in the documentation that you've shared, although it is less clear.

-1
votes

The cache can not be served without any virtual Warehouse.

We require to compute (virtual Warehouse/cross virtual ) to process or preserve the cached data in there local disk.

"These are available across virtual warehouses, so query results returned to one user is available to any other user on the system who executes the same query, provided the underlying data has not changed."

for more detail link