When a query is submitted, Cloud Services parses and optimizes it, then dispatches execution to the Virtual Warehouse. The warehouse scans compressed micro-partitions in parallel using MPP (massively parallel processing).
Multiple warehouses can access the same data simultaneously without lock contention. Each warehouse operates independently with its own compute resources.
| Cache Type | Scope | Duration |
|---|---|---|
| Result Cache | Query results | 24 hours (or until data changes) |
| Warehouse Cache | Data files in SSD | While warehouse is running |
| Metadata Cache | Object metadata | Always fresh |
-- Query data as of 1 hour ago
SELECT * FROM my_table AT(TIMESTAMP => DATEADD(hour, -1, CURRENT_TIMESTAMP));
-- Query data before a specific statement
SELECT * FROM my_table BEFORE(STATEMENT => '019...');