OLAP vs OLTP

OLAP (Online Analytical Processing) en OLTP (Online Transactional Processing) zijn twee verschillende soorten databases met elk hun eigen doel. OLAP-databases zijn bedoeld voor ingewikkelde vragen en data-analyse. Ze worden vaak gebruikt voor bedrijfsrapportages en slimme inzichten. In een OLAP-database lees je vaak veel gegevens en het is belangrijk dat dit snel gebeurt want niemand houdt…

Clustering depth of tables in Snowflake: a potential indicator of clustering health of a table

Clustering depth indicates if micro-partitions are overlapping with one another. Ideally, micro-partitions are not overlapping and are contiguous. Being contiguous means that one micro-partition seamlessly connects with another micro-partition. Sometimes however, micro-partitions are overlapping. A reason for this could be a less than optimal clustering key. Whatever the reason, this is not ideal, because now…

Micro-partitions and clustering in Snowflake

Tables are stored within Snowflake as micro-partitions. Put simply, micro-partitions are basically horizontal slices of the table. These slices divide the table into subsets of rows. This process is called “clustering”. Clustering is done to avoid unnecessarily reading micro-partitions that are not needed for the query. This leads to more efficient, faster and cheaper results.…

Correlated vs uncorrelated subqueries

A subquery is a query that is used in another query. Another example of subqueries can be as simple as the example below. A correlated subquery is a subquery where a reference is made to the outer query. An uncorrelated subquery is a subquery where no reference is made to the outer query. For the…

Tasks in Snowflake

Tasks are an excellent scheduling tool in Snowflake. You can use tasks for a lot of different purposes. Below are some examples: The scheduling can be done using CRON (for example, run a task every hour, minimum schedule is one minute) or using a trigger. You could trigger a task to run after another task…