Re: postgres 9.6: insert into select finishes only in pgadmin notpsql - Mailing list pgsql-general

From Adrian Klaver
Subject Re: postgres 9.6: insert into select finishes only in pgadmin notpsql
Date
Msg-id ce9ad78e-1f5a-332a-ba10-fc58de987dd7@aklaver.com
Whole thread Raw
In response to Re: postgres 9.6: insert into select finishes only in pgadmin not psql  (Corey Taylor <corey.taylor.fl@gmail.com>)
Responses Re: postgres 9.6: insert into select finishes only in pgadmin not psql
List pgsql-general
On 9/23/19 3:56 PM, Corey Taylor wrote:
> On Mon, Sep 23, 2019 at 5:51 PM Adrian Klaver <adrian.klaver@aklaver.com 
> <mailto:adrian.klaver@aklaver.com>> wrote:
> 
>     Usually what is seen here is the opposite, that tables are restored and
>     ANALYZE is not run and performance on the subsequent queries is poor
>     due
>     to lack of current statistics.
> 
>     What is the restore process?
> 
> 
> For these specific legacy db tables, they are isolated in a separate 
> schema.  We then use pg_restore to restore the entire schema.  
> Essentially just:
> 
> pg_restore -n wss --no-owner

Per my previous post and below, the above does not kick off an ANALYZE:

https://www.postgresql.org/docs/11/app-pgrestore.html

"Once restored, it is wise to run ANALYZE on each restored table so the 
optimizer has useful statistics; see Section 24.1.3 and Section 24.1.6 
for more information."

So is there some other step in the process that occurs after the restore 
and before you run your function?

> 
> corey


-- 
Adrian Klaver
adrian.klaver@aklaver.com



pgsql-general by date:

Previous
From: Corey Taylor
Date:
Subject: Re: postgres 9.6: insert into select finishes only in pgadmin not psql
Next
From: Corey Taylor
Date:
Subject: Re: postgres 9.6: insert into select finishes only in pgadmin not psql