Re: Using system tables directly takes many hours, using temp tables with no indexes takes a few seconds for geometry_columns view.

From: Justin Pryzby <pryzby(at)telsasoft(dot)com>
To: Lars Aksel Opsahl <Lars(dot)Opsahl(at)nibio(dot)no>
Cc: pgsql-performance(at)lists(dot)postgresql(dot)org
Subject: Re: Using system tables directly takes many hours, using temp tables with no indexes takes a few seconds for geometry_columns view.
Date: 2022-03-23 13:19:21
Message-ID: 20220323131921.GR28503@telsasoft.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

On Wed, Mar 23, 2022 at 09:44:09AM +0000, Lars Aksel Opsahl wrote:
> Why is temp tables with no indexes much faster system tables with indexes ?

I think the "temp table" way is accidentally faster due to having no
statistics, not because it has no indexes. If you run ANALYZE, you may hit the
same issue (or, maybe you just need to VACUUM ANALYZE your system catalogs).

--
Justin

In response to

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Shai Shapira 2022-03-23 14:42:06 High process memory consumption when running sort
Previous Message Lars Aksel Opsahl 2022-03-23 12:56:39 Re: Using system tables directly takes many hours, using temp tables with no indexes takes a few seconds for geometry_columns view.