Re: splitting a table? - Mailing list pgsql-general

From Richard Huxton
Subject Re: splitting a table?
Date
Msg-id 200306201527.54527.dev@archonet.com
Whole thread Raw
In response to splitting a table?  ("Johnson, Shaunn" <SJohnson6@bcbsm.com>)
Responses Re: splitting a table?  ("Arjen van der Meijden" <acm@tweakers.net>)
List 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

pgsql-general by date:

Previous
From: Jeff Eckermann
Date:
Subject: Re: How to get subscribe-nomail to working ?
Next
From: "Arjen van der Meijden"
Date:
Subject: Re: splitting a table?