Re: Optimize a big matrix select - Mailing list pgsql-novice

From Kevin Grittner
Subject Re: Optimize a big matrix select
Date
Msg-id 1044433198.1346593.1427736722696.JavaMail.yahoo@mail.yahoo.com
Whole thread Raw
In response to Re: Optimize a big matrix select  (Florian Schaetz <Florian.Schaetz@Optitool.DE>)
List pgsql-novice
Florian Schaetz <Florian.Schaetz@Optitool.DE> wrote:

>> Did you run ANALYZE on TEMP_TABLE after loading data and before
>> running your query?
>
> Nope, not yet. What will the effect be? The temp table is
> comparatively small compared to the main table (and has, yet, no
> foreign keys).

A temp table is never vacuumed or analyzed by autovacuum, so unless
you do so using explicit commands it will have default "magic
numbers" statistics.  You are likely to get a better plan if you
run ANALYZE (or perhaps VACUUM ANALYZE) on the temp table after you
load data and before you use it in a query.

--
Kevin Grittner
EDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company


pgsql-novice by date:

Previous
From: Vincenzo Campanella
Date:
Subject: Re: [SQL] Re: [GENERAL] Link Office Word form document with data from PostgreSQL
Next
From: Vincent Veyron
Date:
Subject: Re: [SQL] Re: [GENERAL] Link Office Word form document with data from PostgreSQL