X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (mx1.hub.org [200.46.208.251]) by postgresql.org (Postfix) with ESMTP id 2FB819F9C18 for ; Thu, 18 May 2006 13:41:36 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.208.251]) (amavisd-new, port 10024) with ESMTP id 40285-02 for ; Thu, 18 May 2006 13:41:24 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey- Received: from web30710.mail.mud.yahoo.com (web30710.mail.mud.yahoo.com [68.142.200.143]) by postgresql.org (Postfix) with SMTP id 403BC9F9316 for ; Thu, 18 May 2006 13:41:24 -0300 (ADT) Received: (qmail 98858 invoked by uid 60001); 18 May 2006 16:41:23 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Message-ID:Received:Date:From:Subject:To:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=kFAmeXt/KTUfUQv1kB9f4XyMttc5ieCK0L64VzNJp8Rff0nfupuYfw2ljQk3AfnMH1PIcJ7IDDMhVvX7Wn8ndWNO0lW3v31zM3pZPa5ljYGSUPkH2sHPgIn+9q1pEtMZtBM9z6Lt0GGDuLJ1Mi5SaW+ahH6jwmDXcQe9cSSf8Rs= ; Message-ID: <20060518164123.98856.qmail@web30710.mail.mud.yahoo.com> Received: from [206.83.255.230] by web30710.mail.mud.yahoo.com via HTTP; Thu, 18 May 2006 09:41:23 PDT Date: Thu, 18 May 2006 09:41:23 -0700 (PDT) From: Stephen Byers Subject: Re: why is bitmap index chosen for this query? To: "Steinar H. Gunderson" , pgsql-performance@postgresql.org In-Reply-To: <20060518155906.GA6909@uio.no> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="0-1070734727-1147970483=:98027" Content-Transfer-Encoding: 8bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200605/393 X-Sequence-Number: 19180 --0-1070734727-1147970483=:98027 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit "Steinar H. Gunderson" wrote: It sounds like PostgreSQL badly overestimates the cost of the index scan. Does the table perchance fit completely into memory, without effective_cache_size indicating that? Don't know the exact way to answer your question, but my initial instinct is "no way." select pg_relation_size('packets'); pg_relation_size ------------------ 19440115712 19GB. So it's a big table. The query I submitted earlier returns about 13M rows and the table currently has about 38M rows. --------------------------------- Love cheap thrills? Enjoy PC-to-Phone calls to 30+ countries for just 2¢/min with Yahoo! Messenger with Voice. --0-1070734727-1147970483=:98027 Content-Type: text/html; charset=iso-8859-1 Content-Transfer-Encoding: 8bit "Steinar H. Gunderson" <sgunderson@bigfoot.com> wrote:

It sounds like PostgreSQL badly overestimates the cost of the index scan.
Does the table perchance fit completely into memory, without
effective_cache_size indicating that?

Don't know the exact way to answer your question, but my initial instinct is "no way."
  select pg_relation_size('packets');
 pg_relation_size
------------------
      19440115712
19GB.  So it's a big table.  The query I submitted earlier returns about 13M rows and the table currently has about 38M rows.
 
 


Love cheap thrills? Enjoy PC-to-Phone calls to 30+ countries for just 2¢/min with Yahoo! Messenger with Voice. --0-1070734727-1147970483=:98027--