Received: from localhost (unknown [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id 1483B2E002F for ; Tue, 25 Mar 2008 05:48:40 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 47323-07 for ; Tue, 25 Mar 2008 05:48:37 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.5 Received: from hs-out-0708.google.com (hs-out-0708.google.com [64.233.178.249]) by postgresql.org (Postfix) with ESMTP id 310E62E002D for ; Tue, 25 Mar 2008 05:48:37 -0300 (ADT) Received: by hs-out-0708.google.com with SMTP id x43so2846551hsb.3 for ; Tue, 25 Mar 2008 01:48:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:references; bh=ZAzPmBIqvQs6dcemUgCBf3vSmfYoY7kgmoDTTLMnU+Q=; b=OK3w+fOzRBGPPUBwj3ai/rAEG7byZhWoC5AVTHWw9bFxN9gJv2n7F2eWu/MkDAjjECsu0AB8AnVAbsm3ZboXbE1zSmLA63BKHXy1elJUdMfyCMEczueVYe13TFG7EnYomgEoHOQ6t779SIA74qc3CmFe9mvp761Mrg+0bJGeTDQ= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:references; b=WIG7J3+M4vOhxxWQgwEReWLn2QVYZfUu1CrcBeEHCU2glBv8qGdi+pqWFv0gcsG8WwaGJq7/cviWZVWGeADr8EikCnJQ3TnNnSr4NK4zvDrKgECsujylPbgcPleK+IJJESspl46Nl+4LxorpPn2XnMz2Fw/T/KFz4xt+XnouDiI= Received: by 10.100.58.19 with SMTP id g19mr20498595ana.12.1206434916362; Tue, 25 Mar 2008 01:48:36 -0700 (PDT) Received: by 10.100.105.20 with HTTP; Tue, 25 Mar 2008 01:48:36 -0700 (PDT) Message-ID: Date: Tue, 25 Mar 2008 14:18:36 +0530 From: "sathiya psql" To: "CZUCZY Gergely" Subject: Re: postgresql is slow with larger table even it is in RAM Cc: pgsql-admin@postgresql.org In-Reply-To: <20080325094147.40317ea2@twoflower.in.publishing.hu> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_1872_11756275.1206434916346" References: <20080325094147.40317ea2@twoflower.in.publishing.hu> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.001 tagged_above=0 required=5 tests=HTML_MESSAGE=0.001 X-Spam-Level: X-Archive-Number: 200803/203 X-Sequence-Number: 28686 ------=_Part_1872_11756275.1206434916346 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline On Tue, Mar 25, 2008 at 2:11 PM, CZUCZY Gergely wrote: > May I ask, do you have any indeces or a primary key on that table? > yes, i have both the index and primary key on a column "id", and am doing the SELECT count(id) from TABLE; this is taking 3 seconds ------=_Part_1872_11756275.1206434916346 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline

On Tue, Mar 25, 2008 at 2:11 PM, CZUCZY Gergely <gergely.czuczy@harmless.hu> wrote:
May I ask, do you have any indeces or a primary key on that table?
yes, i have both the index and primary key on a column "id",
and am doing the

SELECT count(id) from TABLE;

this is taking 3 seconds
------=_Part_1872_11756275.1206434916346--