Re: Slow query performance

From: "Scott Marlowe" <scott(dot)marlowe(at)gmail(dot)com>
To: "Kevin Galligan" <kgalligan(at)gmail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Slow query performance
Date: 2008-10-29 22:18:51
Message-ID: dcc563d10810291518g4f3064ffobc491f12beb71a8c@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Wed, Oct 29, 2008 at 2:18 PM, Kevin Galligan <kgalligan(at)gmail(dot)com> wrote:
> I'm approaching the end of my rope here. I have a large database.
> 250 million rows (ish). Each row has potentially about 500 pieces of
> data, although most of the columns are sparsely populated.

A couple of notes here. PostgreSQL stores null values as a single bit
in a bit field, making sparsely populated tables quite efficient as
long as you store the non-existent values as null and not '' or some
other real value.

Have you run explain analyze on your queries yet? Pick a slow one,
run explain analyze on it and post it and we'll see what we can do.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Kevin Galligan 2008-10-29 22:35:58 Re: Slow query performance
Previous Message Scott Marlowe 2008-10-29 22:01:36 Re: Group BY