Re: temporary table as a subset of an existing table and indexes

From: Merlin Moncure <mmoncure(at)gmail(dot)com>
To: Matthieu Huin <matthieu(dot)huin(at)wallix(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: temporary table as a subset of an existing table and indexes
Date: 2010-11-08 21:26:04
Message-ID: AANLkTikZdnrDza+-OaDTi7fkB49EPWqbQLr7D15-MR3k@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Mon, Nov 8, 2010 at 12:15 PM, Matthieu Huin <matthieu(dot)huin(at)wallix(dot)com> wrote:
> Greetings all,
>
> I am trying to optimize SELECT queries on a large table (10M rows and more)
> by using temporary tables that are subsets of my main table, thus narrowing
> the search space to a more manageable size.
> Is it possible to transfer indices (or at least use the information from
> existing indices) from the big table to its subset in a reasonable amount of
> time ?

Are you sure that the benefit of creating scratch tables is worth the
overhead? Can you give explain/analyze of the query you are trying
to optimize?

merlin

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message John R Pierce 2010-11-08 21:28:27 Re: Full Vacuum/Reindex vs autovacuum
Previous Message Scott Marlowe 2010-11-08 21:22:16 Re: finding the other statement causing a sharelock