Received: from maia.hub.org (unknown [200.46.204.183]) by mail.postgresql.org (Postfix) with ESMTP id DD09863381D for ; Thu, 5 Nov 2009 14:02:18 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 80959-06 for ; Thu, 5 Nov 2009 18:02:11 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-iw0-f186.google.com (mail-iw0-f186.google.com [209.85.223.186]) by mail.postgresql.org (Postfix) with ESMTP id E8BD8633787 for ; Thu, 5 Nov 2009 14:02:10 -0400 (AST) Received: by iwn16 with SMTP id 16so186003iwn.29 for ; Thu, 05 Nov 2009 10:02:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=BBqYLAUArHo4kEgSVQHWPkjoOTBNDsunpg828ZL9ylQ=; b=HcgRjxviRhlq/UdouNv4BgMQGmHRx3azk50eZCHqf+SVaW7uFEeNJ9UK8uO+3Gkmkc jqA2Agb4k2CxWVtX9vBjPs6m0iGvjbuEmtjeJJ/TTMtMjP/nYBDNfQyehK0h7m0tVo/5 zy9vtTbzr8uDpAPH3IXqNirxcgk2x2GFkbK08= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=Dmo7FHSaPUyseKPb53mGMeVHAY+T/aksQ8dnM8BzbkZZgwNZWCU3aJxVuedekiHqvG uiXKBJfUHFIQcH6uwnzxciIHAS++q20IeA8BmSfxznDx+Af6uCig4xMlrcL/q2X4mBNb mjt25FH7xcgNDoe22hSV2iMp/kNEHENSfxHYQ= MIME-Version: 1.0 Received: by 10.231.6.153 with SMTP id 25mr576859ibz.54.1257444129644; Thu, 05 Nov 2009 10:02:09 -0800 (PST) In-Reply-To: References: Date: Thu, 5 Nov 2009 11:02:09 -0700 Message-ID: Subject: Re: Running some query in low priority From: Scott Marlowe To: S Arvind Cc: pgsql-performance@postgresql.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-2.599 tagged_above=-10 required=5 tests=BAYES_00=-2.599 X-Spam-Level: X-Archive-Number: 200911/71 X-Sequence-Number: 36239 On Thu, Nov 5, 2009 at 2:36 AM, S Arvind wrote: > Hi Developers and Tuners, > =A0=A0=A0=A0=A0=A0=A0=A0 Is there any way to run some query in low priori= ty and some query > in higher priority in pg. The main reason for this is i need my main > application(high priority) to be undisturbed by the sub application(low > priority) which is running on same DB. Is there anyother good way to oper= ate > this? Are you IO or CPU bound? If CPU bound get more CPUs. If IO bound see about getting more IO, specifically a fast RAID controller with Battery Backed Cache, and a fair number of fast hard drives in a RAID-10. Trying to throttle one thing to get the others to run faster can only buy you so much time. As load increases you'll need more CPU or IO. If the thing you're doing is CPU intensive, and it needs lots of CPUs, then look at some form of replication to other boxes to throw more CPUs at the problem.