pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Dani Oderbolz <oderbolz@ecologic.de>
To: Mendola Gaetano <mendola@bigfoot.com>
Cc: pgsql-admin@postgresql.org
Subject: Re: Partition DB Tables by month
Date: Wed, 30 Jul 2003 18:17:06 +0200
Message-ID: <3F27EF82.6060906@ecologic.de> (raw)
In-Reply-To: <002401c356ab$6007b4e0$32add6c2@mm.eutelsat.org>
References: <3F25BC0B.3050000@ragingnet.com>
	<3F265EC3.5010603@ecologic.de>
	<20030729124246.GA15298@ontko.com>
	<3F267F15.9060705@ecologic.de>
	<00b701c3562c$a9aa83e0$10d4a8c0@mm.eutelsat.org>
	<3F279736.6010500@ecologic.de>
	<002401c356ab$6007b4e0$32add6c2@mm.eutelsat.org>

Mendola Gaetano wrote:

> CREATE TABLE foo (field_a
>
>field_b
>......
>fast_search  BOOLEAN NOT NULL DEFAULT 1,
>time_stamp TIMESTAMPTZ NOT NULL DEFAULT now()
>);
>CREATE INDEX idx_fast_search ON foo ( fast_search ) where fast_search = 't';
>
>for each field to index:
>CREATE INDEX idx_field_a ON foo ( field_a ) where fast_search = 't';
>CREATE INDEX idx_field_b ON foo ( field_b ) where fast_search = 't';
>
>
>at the beginning of each month you can now do:
>
>UPDATE foo SET fast_search = 'f'
>WHERE time_stamp < now() AND
>fast_search = 't';
>  
>
I guess we are missunderstanding each other.
I meant you were saying that you could have a partial index on a view
which does a Union All of may tables (each table contains a Month).
But I think thats really not possible.

Cheers,
Dani




view thread (7+ messages)

Message-ID: <3F27EF82.6060906@ecologic.de>
Permalink:  ../3F27EF82.6060906@ecologic.de/
Also on:    postgresql.org/message-id/3F27EF82.6060906@ecologic.de

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-admin@postgresql.org
  Cc: oderbolz@ecologic.de, mendola@bigfoot.com
  Subject: Re: Partition DB Tables by month
  In-Reply-To: <3F27EF82.6060906@ecologic.de>
  References: <3F25BC0B.3050000@ragingnet.com> <3F265EC3.5010603@ecologic.de> <20030729124246.GA15298@ontko.com> <3F267F15.9060705@ecologic.de> <00b701c3562c$a9aa83e0$10d4a8c0@mm.eutelsat.org> <3F279736.6010500@ecologic.de> <002401c356ab$6007b4e0$32add6c2@mm.eutelsat.org> <3F27EF82.6060906@ecologic.de>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox