« Older Posts

PG Phriday: 10 Ways to Ruin Performance: Forgetting it EXISTS

May 22nd, 2015 | Published in Database, Tech Talk | No Comments

For the second of my ten part series on hidden PGDB (PostgreSQL) performance killers, I’m going to talk about something called an anti-join. It’s not a well-known approach outside of the database world, but due to how it works, it can impart almost magical plan revisions that drastically improve query performance in the right scenario. Developers can add it to a growing bag of tricks when working on database-driven content, since it comes in handy more often than you might expect.

Tags: , , , ,

PG Phriday: 10 Ways to Ruin Performance: Forgetting to EXPLAIN

May 15th, 2015 | Published in Database, Tech Talk | 5 Comments

So here is the first of a ten part series on anti-patterns that can annihilate PGDB (PostgreSQL) performance, some of which are outright insidious. This week we’ll start slow with a short discussion on the importance of EXPLAIN. This is PGDB’s first line of defense against bad queries, and it’s overlooked more than you might expect, as well as somewhat difficult to interpret for the uninformed. I’ll probably have a more in-depth version of this article in the future for truly interpreting EXPLAIN output, but this time we’ll be focusing on using it in general.

Tags: , , , ,

PG Phriday: Functions and Performance Attributes

May 8th, 2015 | Published in Database, Tech Talk | No Comments

Users both old and new are likely aware that PGDB has functions. Some lucky readers may have even written one or two. For those without much experience in this area, or are thinking about contributing a few functions to your database for the first time, there are a couple things you should know. This week, I want to cover a few of the function declaration decorators. If you have no idea what I’m talking about, then this is probably something you’ll want to read regardless of your experience level.

Tags: , , ,

PG Phriday: Reducing Writes With Unlogged Tables

May 1st, 2015 | Published in Database, Tech Talk | 2 Comments

Last week, I covered how [intlink id="pg-phriday-lets-talk-about-data-storage"]MVCC[/intlink], PGDB’s storage system, works on a very high level. Near the end, I also mentioned that it doesn’t quite lend itself well to certain use cases, such as rapidly mutating session storage. Well, there is one caveat to that statement that I’d forgotten about because of its relatively limited utility: unlogged tables.

Tags: , , ,

PG Phriday: Let’s Talk About Data Storage

April 24th, 2015 | Published in Database, Tech Talk | 1 Comment

As a DBA, I strive not to live in an isolated ivory tower, away from the developers that are destined to fill our databases with volumes of data from a myriad of applications. It’s important, I think, to occasionally come back to the basics. So I’d like to discuss one of the core elements that PGDB DBAs might be intimately familiar with, but comes up often enough that some clarification is warranted. How does PostgreSQL store data? The answer may surprise you, and is critical to understand before regularly interacting with a PGDB system.

Tags: , , , , , ,

« Older Posts