Creating Dynamic Pivot Table with QUOTENAME Function
In my previous article on the basic pivot operator, we saw how pivot operator could be used to...
Database Optimization: Indexes
I noticed that very few people understand how indexes work in SQL Server, especially Included Columns. Nevertheless, indexes are the great...
Methods to Rank Rows in SQL Server: ROW_NUMBER(), RANK(), DENSE_RANK() and NTILE()
SQL Server provides us with a number of window functions that help us to perform calculations across a set of rows, without the need to...
Performance of Table Variables in SQL Server
In this article, we are going to touch upon the topic of performance of table variables. In SQL...
Understanding Pivot Operator in SQL
The pivot operator in SQL Server converts each row in the aggregated result set into corresponding columns in the output set. The pivot...
Query Optimization in PostgreSQL. EXPLAIN Basics – Part 2
In my previous article, we started to describe the basics of the EXPLAIN command and analyzed what happens in PostgreSQL when executing a...
Query Optimization in PostgreSQL. EXPLAIN Basics – Part 1
Why does it take so much time to execute a query? Why are there no indexes? Chances are...
Oracle as Workaround of Mutating Tables
The Oracle mutating trigger error occurs when a trigger references the table that owns the trigger, resulting in the “ORA-04091:...
Oracle Regular Expressions. Dangerous Range
An Oracle developer who often uses regular expressions in code sooner or later can face a phenomenon that is indeed mystical. Long-term...
Don’t like database triggers? You just don’t know how to work with them!
When designing large relational databases, we often make a decision to diverge from a normal form,...



