Received: from localhost (maia-2.hub.org [200.46.204.187]) by postgresql.org (Postfix) with ESMTP id 8E0789FB539 for ; Mon, 14 May 2007 14:21:43 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.187]) (amavisd-maia, port 10024) with ESMTP id 26356-01 for ; Mon, 14 May 2007 14:21:32 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.5 Received: from davinci.ethosmedia.com (server227.ethosmedia.com [209.128.84.227]) by postgresql.org (Postfix) with ESMTP id E447E9FA5D3 for ; Mon, 14 May 2007 14:21:32 -0300 (ADT) X-EthosMedia-Virus-Scanned: no infections found Received: from [64.81.245.111] (account josh@agliodbs.com HELO [192.168.1.27]) by davinci.ethosmedia.com (CommuniGate Pro SMTP 4.1.8) with ESMTP-TLS id 12152278; Mon, 14 May 2007 10:25:36 -0700 From: Josh Berkus Reply-To: josh@agliodbs.com Organization: Aglio Database Solutions To: daniel.haensse@swissembedded.com Subject: Re: Transaction prioritization from java possible? Date: Mon, 14 May 2007 10:22:03 -0700 User-Agent: KMail/1.8 Cc: pgsql-performance@postgresql.org, rm_pg@cheapcomplexdevices.com References: <4646DD95.40906@swissembedded.com> In-Reply-To: <4646DD95.40906@swissembedded.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200705141022.04177.josh@agliodbs.com> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200705/252 X-Sequence-Number: 24642 Daniel, > basically we have a transactional web application. The users can browse > through some entries in the database and start a bunch of heavy queries > that take up to 15 minutes (if multiple such heavy queries run in > parallel the performance of the database and webinterface drops very > quickly). The easiest thing will be to serialize these heavy queries and > run it in the background. I can do this from the tomcat server. > Now I would like to prioritize the webinterface user interaction over > these heavy queries. How can I implement this from java? > > Ron mentioned this paper (see > http://www.nabble.com/Background-vacuum-t3719682.html ) > > And I finally found this: > http://weblog.bignerdranch.com/?p=11 > > Is there an easier way from java? Check out the Bizgres project (www.bizgres.org). They currently have a query-queuing system which will eventually be a contrib to mainstream PostgreSQL, but you should be able to use it for development right now. -- --Josh Josh Berkus PostgreSQL @ Sun San Francisco