From: Benjamin Arai <me@benjaminarai.com>
To: PostgreSQL <pgsql-general@postgresql.org>
To: pgsql-performance@postgresql.org
Subject: Partioning tsearch2 a table into chunks and accessing via views
Date: Fri, 24 Aug 2007 17:41:48 -0700
Message-ID: <3147EF26-2649-4FDF-BD86-2DB0AF8460FC@benjaminarai.com> (raw)
Hi,
I have an application which loads millions of NEW documents each month
into a PostgreSQL tsearch2 table. I have the initial version completed
and searching performance is great but my problem is that each time a
new
month rolls around I have to drop all the indexes do a COPY and re-index
the entire table. This is problematic considering that each month takes
longer than the previous to rebuild the indexes and the application in
unavailable during the rebuilding process.
In order to avoid the re-indexing I was thinking of instead creating
a new
table each month (building its indexes and etc) and accessing them all
through a view. This way I only have to index the new data each month.
Does this work? Does a view with N tables make it N times slower for
tsearch2 queries? Is there a better solution?
Benjamin
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 using the --to and --cc options:
reply via email
To: pgsql-performance@postgresql.org
Cc: me@benjaminarai.com, pgsql-general@postgresql.org
Subject: Re: Partioning tsearch2 a table into chunks and accessing via views
In-Reply-To: <3147EF26-2649-4FDF-BD86-2DB0AF8460FC@benjaminarai.com>
* 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