Re: splitting a table?

From: Richard Huxton <dev(at)archonet(dot)com>
To: "Johnson, Shaunn" <SJohnson6(at)bcbsm(dot)com>, pgsql-general(at)postgresql(dot)org
Subject: Re: splitting a table?
Date: 2003-06-20 14:27:54
Message-ID: 200306201527.54527.dev@archonet.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Friday 20 Jun 2003 3:02 pm, Johnson, Shaunn wrote:
> Howdy:
>
> Running PostgreSQL 7.2.1 on RedHat Linux 7.2.
>
> I have a table with about 10 million records and
> even though it's indexed on three key columns,
> it's still pretty slow, I believe, because of the
> size.

Depends what you mean by "pretty slow" - can you provide us with and example
(EXPLAIN ANALYSE SELECT ...) and details of the schema?

> Is there a way to split the data so that I
> can access all the records, but maintain
> smaller tables?

You could split the table and build a view that UNIONs the individual tables,
but that's not very elegant and 10 million records isn't much.

Things to check for:
- Have you run VACCUM FULL or VACUUM ANALYSE recently?
- Are your "where" data-types the same as the index data-types?
- See if the indexes are used in the EXPLAIN ANALYSE output.

--
Richard Huxton

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Kevin Jacobs 2003-06-20 14:29:43 Re: PlPython
Previous Message Jeff Eckermann 2003-06-20 14:20:12 Re: How to get subscribe-nomail to working ?