From: | Kevin Grittner <kgrittn(at)ymail(dot)com> |
---|---|
To: | Florian Schaetz <Florian(dot)Schaetz(at)Optitool(dot)DE>, "pgsql-novice(at)postgresql(dot)org" <pgsql-novice(at)postgresql(dot)org> |
Subject: | Re: Optimize a big matrix select |
Date: | 2015-03-30 17:32:02 |
Message-ID: | 1044433198.1346593.1427736722696.JavaMail.yahoo@mail.yahoo.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-novice |
Florian Schaetz <Florian(dot)Schaetz(at)Optitool(dot)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
From | Date | Subject | |
---|---|---|---|
Next Message | Vincent Veyron | 2015-03-30 17:51:42 | Re: Re: [GENERAL] Link Office Word form document with data from PostgreSQL |
Previous Message | Andy Colson | 2015-03-30 16:48:21 | Re: Link Office Word form document with data from PostgreSQL |