X-Original-To: pgsql-admin-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [64.117.224.130]) by svr1.postgresql.org (Postfix) with ESMTP id 1EE6ED1C4B7 for ; Wed, 30 Jul 2003 16:17:12 +0000 (GMT) Received: from svr1.postgresql.org ([64.117.224.193]) by localhost (neptune.hub.org [64.117.224.130]) (amavisd-new, port 10024) with ESMTP id 69520-05 for ; Wed, 30 Jul 2003 13:16:09 -0300 (ADT) Received: from moutng.kundenserver.de (moutng.kundenserver.de [212.227.126.189]) by svr1.postgresql.org (Postfix) with ESMTP id 86DA7D1C4D6 for ; Wed, 30 Jul 2003 13:17:09 -0300 (ADT) Received: from [212.227.126.161] (helo=mrelayng.kundenserver.de) by moutng.kundenserver.de with esmtp (Exim 3.35 #1) id 19htdU-0005po-00; Wed, 30 Jul 2003 18:17:08 +0200 Received: from [217.230.203.16] (helo=ecologic.de) by mrelayng.kundenserver.de with asmtp (Exim 3.35 #1) id 19htdT-0001nO-00; Wed, 30 Jul 2003 18:17:07 +0200 Message-ID: <3F27EF82.6060906@ecologic.de> Date: Wed, 30 Jul 2003 18:17:06 +0200 From: Dani Oderbolz User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.4) Gecko/20030624 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Mendola Gaetano Cc: pgsql-admin@postgresql.org Subject: Re: Partition DB Tables by month 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> In-Reply-To: <002401c356ab$6007b4e0$32add6c2@mm.eutelsat.org> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200307/335 X-Sequence-Number: 9675 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