Re: Slow query performance - Mailing list pgsql-general

From Scott Marlowe
Subject Re: Slow query performance
Date
Msg-id dcc563d10810291518g4f3064ffobc491f12beb71a8c@mail.gmail.com
Whole thread Raw
In response to Slow query performance  ("Kevin Galligan" <kgalligan@gmail.com>)
Responses Re: Slow query performance  ("Kevin Galligan" <kgalligan@gmail.com>)
List pgsql-general
On Wed, Oct 29, 2008 at 2:18 PM, Kevin Galligan <kgalligan@gmail.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.

pgsql-general by date:

Previous
From: "Scott Marlowe"
Date:
Subject: Re: Group BY
Next
From: "Kevin Galligan"
Date:
Subject: Re: Slow query performance