Re: Use of indexes with table inheritance

From: Alvaro Herrera <alvherre(at)dcc(dot)uchile(dot)cl>
To: Christopher Petrilli <petrilli(at)gmail(dot)com>
Cc: pgsql General List <pgsql-general(at)postgresql(dot)org>
Subject: Re: Use of indexes with table inheritance
Date: 2005-02-07 22:34:52
Message-ID: 20050207223452.GC30539@dcc.uchile.cl
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Mon, Feb 07, 2005 at 01:59:16PM -0500, Christopher Petrilli wrote:
> I have a "master table" called events, and 10 subtables which are
> created using this:
>
> CREATE TABLE events001 ( ) INHERITS (events) WITHOUT OIDS;
>
> I then build all the indexes on it, including a column called "src_ip":
>
> CREATE INDEX events001_src_ip_idx ON events001(src_ip);
>
> Then I populate it with about 1M events per table, but none in the
> "master table". I'm using this for data partitioning basically.

Any reason you don't use a single table? Also, please post the EXPLAIN
ANALYZE of your query.

--
Alvaro Herrera (<alvherre[(at)]dcc(dot)uchile(dot)cl>)
"Estoy de acuerdo contigo en que la verdad absoluta no existe...
El problema es que la mentira sí existe y tu estás mintiendo" (G. Lama)

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tim Vadnais 2005-02-07 23:08:12 a SELECT FOR UPDATE question
Previous Message Noah Friedland 2005-02-07 22:10:32 External Projects in the PostgreSQL release