Statements

Creating Dynamic Pivot Table with QUOTENAME Function

Database development, Statements, Tables

In my previous article on the basic pivot operator, we saw how pivot operator could be used to...
Read More

Methods to Rank Rows in SQL Server: ROW_NUMBER(), RANK(), DENSE_RANK() and NTILE()

Database development, Statements

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...
Read More

Understanding Pivot Operator in SQL

Database development, Statements

The pivot operator in SQL Server converts each row in the aggregated result set into corresponding columns in the output set. The pivot...
Read More

Query Optimization in PostgreSQL. EXPLAIN Basics – Part 2

Database development, PostgreSQL, Statements

In my previous article, we started to describe the basics of the EXPLAIN command and analyzed what...
Read More

Query Optimization in PostgreSQL. EXPLAIN Basics – Part 1

Database development, PostgreSQL, Statements

Why does it take so much time to execute a query? Why are there no indexes? Chances are you’ve heard about EXPLAIN in PostgreSQL....
Read More

Oracle Regular Expressions. Dangerous Range

Computer Environment, Database development, Statements

An Oracle developer who often uses regular expressions in code sooner or later can face a phenomenon that is indeed mystical. Long-term...
Read More

Eliminating Duplication of Where Expressions in Application

Database development, Statements

Assume you have products and categories. A client says that it is necessary to use other business...
Read More

Better ALTER than DROP

Database development, Statements

In this article, I am going to provide a construction for deleting an object before creating it....
Read More

What Can Query Plan Tell?

Database development, Statements

Introduction SQL query describes the expected result, not the way to get the result. The set of specific steps the server must take to...
Read More

Optimizing Overlapping Queries Part 1: Introduction & Enhanced T-SQL Solution

Database administration, Performance Tuning, Statements

Databases that serve business applications should often support temporal data. For example, suppose...
Read More
Close