Received: from maia.hub.org (maia-3.hub.org [200.46.204.243]) by mail.postgresql.org (Postfix) with ESMTP id 12D21B5DC0E for ; Sun, 15 May 2011 21:25:35 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.243]) (amavisd-maia, port 10024) with ESMTP id 21960-05 for ; Mon, 16 May 2011 00:25:28 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from www.postnewspapers.com.au (www.postnewspapers.com.au [173.230.139.50]) by mail.postgresql.org (Postfix) with ESMTP id 5B092B5DC0D for ; Sun, 15 May 2011 21:25:28 -0300 (ADT) Received: from localhost (localhost [127.0.0.1]) by www.postnewspapers.com.au (Postfix) with ESMTP id A9F68EB; Sun, 15 May 2011 20:25:25 -0400 (EDT) X-Virus-Scanned: amavisd-new at postnewspapers.com.au.com Received: from www.postnewspapers.com.au ([127.0.0.1]) by localhost (www.postnewspapers.com.au [127.0.0.1]) (amavisd-new, port 10024) with LMTP id r8EdWxso952y; Sun, 15 May 2011 20:25:25 -0400 (EDT) Received: from mail.postnewspapers.com.au (ppp171-128.static.internode.on.net [150.101.171.128]) by www.postnewspapers.com.au (Postfix) with ESMTP id EAD4D3E; Sun, 15 May 2011 20:25:24 -0400 (EDT) Received: from [10.0.0.53] (wallace.localnet [10.0.0.53]) by mail.postnewspapers.com.au (Postfix) with ESMTP id C1E9BAE3E3; Mon, 16 May 2011 08:25:23 +0800 (WST) Message-ID: <4DD06EF3.7030003@postnewspapers.com.au> Date: Mon, 16 May 2011 08:25:23 +0800 From: Craig Ringer User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.15) Gecko/20110307 Thunderbird/3.1.9 MIME-Version: 1.0 To: Stefan Keller CC: pgsql-performance@postgresql.org Subject: Re: KVP table vs. hstore - hstore performance (Was: Postgres NoSQL emulation) References: In-Reply-To: X-Enigmail-Version: 1.1.2 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.91 tagged_above=-10 required=5 tests=BAYES_00=-1.9, T_RP_MATCHES_RCVD=-0.01 X-Spam-Level: X-Archive-Number: 201105/229 X-Sequence-Number: 43738 On 14/05/11 18:10, Stefan Keller wrote: > Hi, > > I am conducting a benchmark to compare KVP table vs. hstore and got > bad hstore performance results when the no. of records is greater than > about 500'000. > > CREATE TABLE kvp ( id SERIAL PRIMARY KEY, key text NOT NULL, value text ); > -- with index on key > CREATE TABLE myhstore ( id SERIAL PRIMARY KEY, obj hstore NOT NULL ); > -- with GIST index on obj > > Does anyone have experience with that? What are your queries? What does EXPLAIN ANALYZE report on those queries? Did you ANALYZE your tables after populating them? -- Craig Ringer