Tag: SQL
All the articles with the tag "SQL".
-
Window Functions vs JOIN in Spark: A Physical Plan Perspective
When solving analytical queries in Spark SQL, there are often multiple correct formulations. However, they do not produce equivalent execution plans. This article compares two approaches to the same
-
Why Small Tables Can Explode: Understanding JOIN Cardinality in SQL
It is common to assume that joining two small tables will produce a small result set. In practice, this assumption frequently fails. Even tables with only a handful of rows can generate unexpectedly
-
Querying JSONB in PostgreSQL Efficiently
In modern applications, it is common to store semi-structured data in JSON format inside a relational database like PostgreSQL. However, to analyze this data properly, you need a way to transform it
-
Understanding Window Functions in SQL: Beyond Simple Aggregations
When we think about SQL functions, we often start with scalar functions ( UPPER() , ROUND() , NOW() ) or aggregate functions ( SUM() , AVG() , COUNT() ). But there is a third type that is essential
-
he Enduring Relevance of Peter Chen’s Entity-Relationship Model
In the landscape of data modeling, few contributions have had the long-lasting impact of Peter Chen’s Entity-Relationship (E-R) Model , introduced in 1976. More than four decades later, it remains a
-
How Joins Work in PostgreSQL
Joins are one of the most powerful features in SQL, allowing you to combine data from multiple tables in a single query. PostgreSQL, as a relational database system, provides robust support for
-
How to Improve Query Performance in PostgreSQL
PostgreSQL is a powerful relational database, but even the most robust systems can suffer from slow queries without proper tuning. Optimizing query performance is crucial to ensure scalability,
-
Optimizing Joins in PostgreSQL: Practical Cases
Joins are essential for querying relational databases, but they can significantly impact performance if not optimized correctly. PostgreSQL provides several ways to improve join efficiency, from