Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1TMgNC-0007ps-0s for pgsql-performance@postgresql.org; Fri, 12 Oct 2012 14:37:58 +0000 Received: from forward19.mail.yandex.net ([2a02:6b8:0:1402::4]) by magus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1TMgN5-0005Zg-LF for pgsql-performance@postgresql.org; Fri, 12 Oct 2012 14:37:57 +0000 Received: from web19g.yandex.ru (web19g.yandex.ru [95.108.252.119]) by forward19.mail.yandex.net (Yandex) with ESMTP id D9A9F11221A9; Fri, 12 Oct 2012 18:37:48 +0400 (MSK) Received: from 127.0.0.1 (localhost.localdomain [127.0.0.1]) by web19g.yandex.ru (Yandex) with ESMTP id 64CB64578040; Fri, 12 Oct 2012 18:37:48 +0400 (MSK) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail; t=1350052668; bh=OWvwUMcKwDmDsAlgwgc1fQoFp95G1uHN7mI8etKUEWc=; h=From:To:Cc:In-Reply-To:References:Subject:MIME-Version:Message-Id: Date:Content-Transfer-Encoding:Content-Type; b=dOs5bys/WVfRAhx6R92pzBhSGIg3DzImGYcl5MvdzNCc5Q46nRUCimQlzvjoTikfo +WfuYNaaNaz0H6DgAsNV9NuxF/OfSvtqn21s8lxfkII4zPbBn3demMnLRclyOrW3zM WBzUB08c0Mtbb9JNo/5wsskK9OycUHaxebyUolEk= Received: from [188.168.10.0] ([188.168.10.0]) by web19g.yandex.ru with HTTP; Fri, 12 Oct 2012 18:37:48 +0400 From: Korisk To: =?utf-8?B?T25kcmVqIEl2YW5pxI0=?= Cc: Sergey Konoplev , Craig Ringer , "pgsql-performance@postgresql.org" In-Reply-To: References: <118871349885342@web16f.yandex.ru> <323831349928808@web5g.yandex.ru> <50764D55.2060401@ringerc.id.au> <53981349968513@web6f.yandex.ru> <246351350014151@web25e.yandex.ru> <270381350015278@web27h.yandex.ru> Subject: Re: hash aggregation MIME-Version: 1.0 Message-Id: <846851350052668@web19g.yandex.ru> Date: Fri, 12 Oct 2012 18:37:48 +0400 X-Mailer: Yamail [ http://yandex.ru ] 5.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain X-Pg-Spam-Score: -2.0 (--) X-Archive-Number: 201210/162 X-Sequence-Number: 48121 > What I can not understand is why the seq scan's estimated cost is > better the index scan's one. It depends on the number of pages in > index/relation. May be the index is heavily bloated? Mm i don't know how to see bloating level. But the index was created by create index on hashcheck using btree (name) after the table population. Sizes: hashes=# select pg_total_relation_size('hashcheck'); pg_total_relation_size ------------------------ 2067701760 (1 row) hashes=# select pg_total_relation_size('hashcheck_name_rev_idx'); pg_total_relation_size ------------------------ 629170176 (1 row)