limiting execution time of queries

Started by Hagen Hoepfnerover 21 years ago2 messagesgeneral
Jump to latest
#1Hagen Hoepfner
Hagen.Hoepfner@gmx.de

Dear list,

i want to limit the execution time of an SQL-query. That means, that the
query should be stoped if it takes longer that e.g. 10 seconds. How can
I do so?

Hagen

#2Bruce Momjian
bruce@momjian.us
In reply to: Hagen Hoepfner (#1)
Re: limiting execution time of queries

Hagen Hoepfner wrote:

Dear list,

i want to limit the execution time of an SQL-query. That means, that the
query should be stoped if it takes longer that e.g. 10 seconds. How can
I do so?

Sure, use SET statement_timeout or in postgresql.conf.

-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073