Re: Question on partitioning

From: "Scott Marlowe" <scott(dot)marlowe(at)gmail(dot)com>
To: "Oliveiros Cristina" <oliveiros(dot)cristina(at)marktest(dot)pt>
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: Question on partitioning
Date: 2008-08-21 16:50:27
Message-ID: dcc563d10808210950u91864bcl50b68b0d7b51f02f@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

On Thu, Aug 21, 2008 at 8:25 AM, Oliveiros Cristina
<oliveiros(dot)cristina(at)marktest(dot)pt> wrote:
> Hello , All.
>
> I am not sure if this is the right mailing list to place this question.
> If it doesn't, please kindly redirect me to the right list.
>
> I have a giant table with about 10,6 million records.

10.6 million rows isn't really gigantic. It's a good size, but unless
you're hitting a lot of the records at once, you should be able to get
pretty good performance if it's indexed properly.

> Queries on it are usually slow, and if I try to do something more elaborate
> like an INNER JOIN with itself it becomes unnacceptably slow.
>
> I am looking for a way to improve performance.
> One of the columns is of type date. Each "day" includes about a few tens of
> thousands records
> And the older a date is the less likely I am to do queries on it.

Well, first let's look at your indexes and if they're being used.
Got an explain analyze output of your slow queries for us to look at?

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Mark Roberts 2008-08-21 18:00:41 Re: Question on partitioning
Previous Message Oliveiros Cristina 2008-08-21 14:25:14 Question on partitioning