Re: Optimize a big matrix select

From: Florian Schaetz <Florian(dot)Schaetz(at)Optitool(dot)DE>
To: "pgsql-novice(at)postgresql(dot)org" <pgsql-novice(at)postgresql(dot)org>
Subject: Re: Optimize a big matrix select
Date: 2015-03-31 09:13:51
Message-ID: 01E7E8E50C98824E9045DFD5FFC859D403405B5F8F2F@SBSRV.ot.local
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

> 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.

Thanks for the tip. Unfortunately, while testing, this doesn't seem to make any difference, not even when using non-temporary tables (with ANALYZE/VACUUM). Still more than 10 seconds for the fetch, 1-2 for the count. It seems, the problem is simply that the fact that we are talking about more than 100MB an data that needs to be fetched.

Regards,

Flo

Browse pgsql-novice by date

  From Date Subject
Next Message Tom Lane 2015-03-31 14:02:39 Re: From hstore to jsonb (type of column)
Previous Message Alexandre Delanoë 2015-03-31 08:11:01 From hstore to jsonb (type of column)