Can snowflake work as an operational data store against which I can write rest APIs

Viewed 1407

I am researching snowflake database and have a data aggregation use case, where i need to expose the aggregated data via a Rest API. While the data ingestion and aggregation seems to be well defined, is snowflake a system that can be used as an operational data store for servicing high throughput apis? Or is this an anti pattern for this system

1 Answers

Updating based on your recent comment.

Here's some quick test results I did on large tables we have in production. *Changed the table names for display.

vLookupView records = 175,760,316

vMainView records = 179,035,026

SELECT 
    LP.REGIONCODE
    , SUM(L.VALUE)    
FROM DBO.vLookupView AS LP
INNER JOIN DBO.vMainView AS M
    ON LP.PK = M.PK
GROUP BY LP.REGIONCODE;

Results:

SQL SERVER 
Production box - 2:04 minutes
**Snowflake:**
By Warehouse (compute) size
XS - 17.1 seconds
Small - 9.9 seconds
Medium - 7.1s seconds
Large - 5.4 seconds
Extra Large - 5.4 seconds

When I added a WHERE condition

WHERE L.ENTEREDDATE BETWEEN '1/1/2018' AND '6/1/2018'

the results were:

SQL SERVER 
Production box - 5 seconds
**Snowflake:**
By Warehouse (compute) size
XS - 12.1 seconds
Small - 3.9 seconds
Medium - 3.1s seconds
Large - 3.1 seconds
Extra Large - 3.1 seconds
Related