Received: from localhost (unknown [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id 636E52E0102 for ; Sun, 2 Dec 2007 07:55:40 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 34668-03 for ; Sun, 2 Dec 2007 07:55:37 -0400 (AST) Received: from mu-out-0910.google.com (mu-out-0910.google.com [209.85.134.186]) by postgresql.org (Postfix) with ESMTP id 5CFFC2E0101 for ; Sun, 2 Dec 2007 07:55:37 -0400 (AST) Received: by mu-out-0910.google.com with SMTP id i10so82574mue for ; Sun, 02 Dec 2007 03:55:35 -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=LQ1XKA95iU5NnjygmlQSvI3Mld472AQ/05IFyHC3oW8=; b=qalF0MCyVjlktJWbamH9SGPTfTwNC2j/xB69KpBl+dfQhaK4IdgurQZRZAeedoHT6RH4gT/Af03QpLhYB94YCqaW6Rv+udr6Ah6esRaJRbGv/ht5mA7px20iba7UZhCrXI3kVVDXV4H9bB924gDpn/cesNDr4CS1Gopv4RpNjgU= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=VnNgwAUxxvQVMdFtFpIqNXqEvqBdKJkf25u4gnN6v7lFkSp17iU9RfeqB7iNuLxzEAGwmJt1LeOgU/R5pyGNJshBfjQHzg+fShCxs10Yn8OMoL4oQdXdWVTdHp0QOTnEUp5M1H4gY1as+RLPJn6NZPruVngXK923N1Cu/4yE8VY= Received: by 10.82.158.12 with SMTP id g12mr13386892bue.1196596534813; Sun, 02 Dec 2007 03:55:34 -0800 (PST) Received: by 10.82.120.16 with HTTP; Sun, 2 Dec 2007 03:55:34 -0800 (PST) Message-ID: <1d4e0c10712020355j133e0d31n653a531da1834c80@mail.gmail.com> Date: Sun, 2 Dec 2007 12:55:34 +0100 From: "Guillaume Smet" To: Mindaugas Subject: Re: Dealing with big tables Cc: pgsql-performance@postgresql.org In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200712/9 X-Sequence-Number: 27825 On Dec 2, 2007 11:26 AM, Mindaugas wrote: > I execute simple query "select * from bigtable where From='something'". Query returns like 1000 rows and takes 5++ seconds to complete. As far as I understand the query is slow because: Can you post an EXPLAIN ANALYZE? Which version of PostgreSQL do you use? -- Guillaume