Re: Question on partitioning - Mailing list pgsql-sql

From Scott Marlowe
Subject Re: Question on partitioning
Date
Msg-id dcc563d10808210950u91864bcl50b68b0d7b51f02f@mail.gmail.com
Whole thread Raw
In response to Question on partitioning  ("Oliveiros Cristina" <oliveiros.cristina@marktest.pt>)
List pgsql-sql
On Thu, Aug 21, 2008 at 8:25 AM, Oliveiros Cristina
<oliveiros.cristina@marktest.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?


pgsql-sql by date:

Previous
From: "Oliveiros Cristina"
Date:
Subject: Question on partitioning
Next
From: Mark Roberts
Date:
Subject: Re: Question on partitioning