Re: Long running queries degrade performance

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Chris Kratz <chris(dot)kratz(at)vistashare(dot)com>
Cc: pgsql-performance(at)postgresql(dot)org
Subject: Re: Long running queries degrade performance
Date: 2004-04-16 21:12:52
Message-ID: 2850.1082149972@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

Chris Kratz <chris(dot)kratz(at)vistashare(dot)com> writes:
> ... Or if worse comes to worse to actually kill long running
> processes without taking down the whole db as we have had to do on occasion.

A quick "kill -INT" suffices to issue a query cancel, which I think is
what you want here. You could also consider putting an upper limit on
how long things can run by means of statement_timeout.

Those are just band-aids though. Not sure about the underlying problem.
Ordinarily I'd guess that the big-hog queries are causing trouble by
evicting everything the other queries need from cache. But since your
database fits in RAM, that doesn't seem to hold water.

What PG version are you running?

regards, tom lane

In response to

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Chris Kratz 2004-04-16 21:26:32 Re: Long running queries degrade performance
Previous Message Chris Kratz 2004-04-16 20:51:29 Re: Long running queries degrade performance