Search Postgresql Archives

Re: postgres 9.6: insert into select finishes only in pgadmin not psql

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 9/23/19 3:56 PM, Corey Taylor wrote:
On Mon, Sep 23, 2019 at 5:51 PM Adrian Klaver <adrian.klaver@xxxxxxxxxxx <mailto:adrian.klaver@xxxxxxxxxxx>> 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@xxxxxxxxxxx





[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]

  Powered by Linux