In our last post, we talked about some of my favorite queries I use in Snowflake to see various items of interest – such as finding the worst-performing queries. For today’s post, though, I want to talk about performance tuning. Yes, you read that right. We’re going to use query history to do some fun…… Continue reading Even more Great Queries Using Query History
Tag: Snowflake
Some Great Queries Using the Query History
Now that we know so much about getting data from Snowflake using the query history, we should be able to get all kinds of data that will be helpful for us. In the next few queries, I want to provide some queries I use that should make your Snowflake usage a bit more useful. The…… Continue reading Some Great Queries Using the Query History
Even more Query History in Snowflake
In previous posts, we have discussed differing ways of getting at the query history. In those posts, we discussed getting that data by the session or by a specific user. Today, I want to examine another way of getting to that data. This new way – is by warehouse. I have tried to set up…… Continue reading Even more Query History in Snowflake
Querying History By Sessions in Snowflake
Last time, we talked about a query using the Query_History_By_User table function in Snowflake. This time, I want to discuss a similar table function named Query_History_By_Session. Thankfully, it works in a very similar fashion to Query_History_By_User. SELECT * FROM TABLE(SNOWFLAKE.INFORMATION_SCHEMA.QUERY_HISTORY_BY_USER()) ORDER BY START_TIME DESC; Yes, it shows the same information as Query_History_By_User, so I am…… Continue reading Querying History By Sessions in Snowflake
Cool Items in Snowflake that Aren’t in SQL Server
Yes, I know. The name of today’s post is certainly clickbait. But it’s true! There are so many things you can do in Snowflake that may – or may not – be possible in SQL Server, at least not without several tricks and possibly low-level querying. So, let’s start shall we? What did I run?…… Continue reading Cool Items in Snowflake that Aren’t in SQL Server
Common Table Expressions Can Be A Good Thing
Most of our coding these days has Common Table Expressions, also known as CTEs. If not, you’re either working on an older version of SQL Server or you haven’t been introduced to this piece of goodness. CTEs can make reading SQL queries a lot easier if the logic is convoluted. For example, let’s use the…… Continue reading Common Table Expressions Can Be A Good Thing
Basic Analysis of Data with Snowflake
Now and again, you’ll be asked to do some basic analysis of your data in Snowflake. Now by “basic analysis,” I mean for each column tell how many rows are populated, what’s the largest and smallest value in the column, etc… Some of you will want to review each and every column of every table…… Continue reading Basic Analysis of Data with Snowflake
Removing Objects Is Not So Simple
When you’re working between SQL Server and Snowflake, there can be a lot of crossover that may make you forget what system you’re working in. Sometimes it’s close, but not close enough. Today, let’s go over something that should be rather simple – removing old objects that we shouldn’t need any longer. In SQL Server,…… Continue reading Removing Objects Is Not So Simple
Making Python work with Snowflake For Fun and Pleasure
As we did last week in our post on Creating a new function in Snowflake, I want to talk about some of the scripts and languages I use to make my life easier in Snowflake. As the site LearnPython says: “Today, Python is one of the most popular programming languages because of its beginner-friendly syntax, efficiency, and…… Continue reading Making Python work with Snowflake For Fun and Pleasure
Creating a new function in Snowflake
Sometimes, you’ll need to create functions that do a particular thing. They’re not always pretty. Some of them look like they should have been thrown out with the bathwater. Unlike SQL Server, user-defined functions in Snowflake can be done in several different languages. They can be done in Java, JavaScript, Python, Scala, or plain-old SQL.…… Continue reading Creating a new function in Snowflake