Re: Query hitting empty tables taking 48 minutes

From: Robert Creager <robertc(at)spectralogic(dot)com>
To: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-general <pgsql-general(at)postgresql(dot)org>, Robert Creager <robertc(at)spectralogic(dot)com>
Subject: Re: Query hitting empty tables taking 48 minutes
Date: 2018-06-08 16:17:47
Message-ID: 58B4CE0F-203B-4F1D-8329-E269E68F616C@spectralogic.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Jun 7, 2018, at 4:58 PM, David G. Johnston <david(dot)g(dot)johnston(at)gmail(dot)com<mailto:david(dot)g(dot)johnston(at)gmail(dot)com>> wrote:

I would suspect that vacuuming these tables would solve your problem. Whether there is an issue beyond a lack of vacuuming, or related to auto-vacuum, I am unsure. Though at this point it may take a vacuum full to recover back to a sane state. Though ANALYZE by itself should clear up the statistical discrepancy.

A nightly VACUUM FULL which ran based on heuristics resolved the problem. This would seem to point to a db problem more than an app problem? I’m unsure how the app could have an affect of this magnitude on the database, although I’d love to be told otherwise.

Best,
Robert

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message David G. Johnston 2018-06-08 16:23:41 Re: Query hitting empty tables taking 48 minutes
Previous Message Tom Lane 2018-06-08 15:57:47 Re: Code of Conduct plan