I'm trying to track down Snowflake usage via the snowflake query_history table. I notice that for a few apps, there's near "100%" usage, if I track it by start_time and elapsed time. But, the queries are full of things like "select /* nodejs:heartbeat */ 1;" which I'm told don't actually cost anything. That's cool. But, how can I make my report know that they don't cost anything?
I noticed that this query:
select query_text from query_history where warehouse_size is null;
seems to get me all the queries that are "trivial"... "SELECT current_date", "select /* nodejs:heartbeat */ 1;", etc...
But, sometimes, it also gives me seemingly non-trivial selects: "select * from cst_usr_info where deleted_at is null and lower(usr_email) = ?" for instance...
I guess my questions are:
- Does "warehouse_size is null" mean that there is no cost to the query?
- If so, then is the reason that the "non-trivial" selects are costless because perhaps they've been cached or something?