O'Reilly logo

PostgreSQL 9 Administration Cookbook by Hannu Krosing, Simon Riggs

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Simplifying complex SQL

There are two types of complexity which you can encounter in SQL queries.

First, the complexity can be directly visible in the query, having hundreds or even thousands of rows of SQL code in a single query code. This can cause both maintenance headaches and slow execution times as well.

The complexity can also be hidden in subviews, so that the SQL code of the query seems simple, but it uses other views and/or functions to do part of the work, which can in turn still use others. This is much better for maintenance, but still can cause performance problems.

Both types of queries can be either written manually by programmers or data analysts, or they can emerge as a result of a query generator.

Getting ready

First, verify that ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required