Search Postgresql Archives

Re: Query hitting empty tables taking 48 minutes

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

 





On Jun 8, 2018, at 10:23 AM, David G. Johnston <david.g.johnston@xxxxxxxxx> wrote:

​Not sure what the right answer is but its seems your database (those tables at least) are mis-configured for the workload being ​executed against them.  Significantly increasing the aggressiveness of the auto-vacuum process and/or inserting manual vacuum analyze commands into your application at appropriate times are probably necessary.


I’m fine with changing up table parameters, which is the option that would make sense for us (thanks for pointing that out).  I have the auto vacuum threshold high because of other huge tables, and was not aware of the per table settings.  I’ll use this excuse one time, I inherited this setup, now I own it :-)

I’m concerned about a query that’s going against two tables that have had 300k entries in them (ie now empty and 2 entries) taking so long.  Even if those tables where full, the query should of taken no time at all.  The machine has 64GB memory, 12 physical cores (+12 hyper threads) and the storage is on a ZFS pool with 5 mirrored vdevs of 7.2k SAS drives.  The entire db size is 2.63GB, easily fitting into memory.  This is a production appliance, and is build to handle the load.  Obviously needs some intelligent tuning though.


nspnamerelnamen_tup_insn_tup_updn_tup_deln_live_tupn_dead_tupreltuplesav_thresholdlast_vacuumlast_analyzeav_neededpct_dead
ds3blob303498255930349620250002018-06-08 04:35:00.000000NULLfalse0
ds3job_entry30365981530365900050002018-06-08 04:35:00.000000NULLfalse0

Best,
Robert

[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