Received: from localhost (unknown [200.46.204.183]) by mail.postgresql.org (Postfix) with ESMTP id 0BAFE65011F for ; Mon, 17 Nov 2008 13:16:40 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 03759-03 for ; Mon, 17 Nov 2008 13:16:35 -0400 (AST) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from wf-out-1314.google.com (wf-out-1314.google.com [209.85.200.174]) by mail.postgresql.org (Postfix) with ESMTP id 15F3664FD63 for ; Mon, 17 Nov 2008 13:16:33 -0400 (AST) Received: by wf-out-1314.google.com with SMTP id 25so2611661wfc.28 for ; Mon, 17 Nov 2008 09:16:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:cc:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:references; bh=jwo6O5xVxhWxjhaNu87Aszh0Wq3LYoukPfzXi1ETFbw=; b=iuhXD8G588cIks3BHORyQuwniFwN+4x6l9KgeEvq8s0xpBE/mDmYZ9YlELOFoNbnLb PRc3FV7tWHEFOkN5QV/dVOijOxWKqjWZ6WU+D+VHLVJcIOWNdQgC1YCqdRlh7l8wOo5R n/rqeFv0bW246ne8zdIOsfaSajsb7Ph0hjRTs= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :references; b=xEhEaR4x/d3D3uzpgETZqGYpMJ+8MGDiBr2MCjKk/zcgXK/IKQhz8XKiIYiJLv4CTg 9PS52jv1DypBVa7lNz2AqxsYwiDz4UHp3b0AWuhvCTQQpaB+WXfvXGi3BR5WWxmnrDke 7BdXzzc/FrWNy7JqI1KjkgK83syCw5S1To8II= Received: by 10.114.197.1 with SMTP id u1mr2628997waf.120.1226942192224; Mon, 17 Nov 2008 09:16:32 -0800 (PST) Received: by 10.114.137.14 with HTTP; Mon, 17 Nov 2008 09:16:32 -0800 (PST) Message-ID: Date: Mon, 17 Nov 2008 10:16:32 -0700 From: "Scott Marlowe" To: "Dimi Paun" Subject: Re: Bad performance on simple query Cc: pgsql-performance In-Reply-To: <1226941621.5760.97.camel@dimi.lattica.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <1226937197.5760.89.camel@dimi.lattica.com> <1226941621.5760.97.camel@dimi.lattica.com> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0 tagged_above=0 required=5 tests=none X-Spam-Level: X-Archive-Number: 200811/149 X-Sequence-Number: 31880 On Mon, Nov 17, 2008 at 10:07 AM, Dimi Paun wrote: > > On Mon, 2008-11-17 at 09:53 -0700, Scott Marlowe wrote: >> >> Are you saying it's excessive you need the compound query? Cause >> that's running in 91microseconds as pointed out by Alan. > > Of course, my bad. I read that as 91ms (). > > Confusion came from the fact that pgadminIII reports the query > taking 20-40ms, so I read the 0.091 as seconds not ms. Ahhh. Keep in mind that if you just run the query, pgadminIII will tell you how long it took to run AND return all the data across the network, so it will definitely take longer then. But most of that's network io wait so it's not a real issue unless you're saturating your network.