What if you could instantly spot the slowest parts of your database without guessing?
Why Query history and profiling in Snowflake? - Purpose & Use Cases
Imagine you run a busy restaurant and want to know which dishes customers order most and how long each takes to prepare.
Without a system, you'd have to remember every order and cooking time yourself.
Trying to track every query manually is like writing down every dish order on scraps of paper.
It's slow, easy to lose information, and hard to spot patterns or problems.
Query history and profiling tools automatically record every query run and how long it took.
This helps you quickly see which queries are slow or used most, just like a digital kitchen logbook.
SELECT * FROM queries WHERE time > 'yesterday'; -- manually check logsSELECT query_text, total_elapsed_time FROM table(information_schema.query_history()) WHERE start_time > DATEADD(day, -1, CURRENT_TIMESTAMP());It lets you easily find slow queries and optimize your database performance like a chef improving kitchen speed.
A data analyst notices a report runs slowly every morning.
Using query profiling, they find a specific query causing delays and fix it, speeding up the report.
Manual tracking of queries is slow and error-prone.
Query history automatically logs all queries and their details.
This helps find and fix slow or costly queries quickly.