Received: from maia.hub.org (maia-3.hub.org [200.46.204.243]) by mail.postgresql.org (Postfix) with ESMTP id C88BB6332E6 for ; Fri, 18 Jun 2010 15:30:20 -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 83101-06 for ; Fri, 18 Jun 2010 18:30:13 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-wy0-f174.google.com (mail-wy0-f174.google.com [74.125.82.174]) by mail.postgresql.org (Postfix) with ESMTP id 8BD816332D6 for ; Fri, 18 Jun 2010 15:30:13 -0300 (ADT) Received: by wyb33 with SMTP id 33so847766wyb.19 for ; Fri, 18 Jun 2010 11:30:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from :user-agent:mime-version:to:cc:subject:references:in-reply-to :content-type:content-transfer-encoding; bh=v+eGNaJT4UlEcNySohkrTtqI3yUG0XqQEbd3aJpNHn8=; b=cVYFX9SBXkcftXBhH5MbhB5gv9NeolIW3B22D8xXujm6A3QOHumW4AW+O1azQEZVHj YxyHbRYpZbu4F266CXnA8EcJl8+H0EEGbC4sJghg8bt0XSAmq9hfNhv6KZzkJigZZIJl icE63lpHiaFwNP8byS5NjOH6iaxWUKsv8kC8w= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; b=kDhg31p6fzdOITN0F5Oicpv5+S03JzoOVkYf7qCfRn+Xaf1wU0APH2RjduL2LZjJuR 6iPkSEe/yQ2Auquh//3px4vCKm9EPeLaHznmWD0Enc+htZi1YZ/lvkjujtExXJUGkShY /QonFOb2Yi0BMAo/hWyZhFUfM1lN8deJjBH3Q= Received: by 10.227.145.133 with SMTP id d5mr1391021wbv.43.1276885811755; Fri, 18 Jun 2010 11:30:11 -0700 (PDT) Received: from [0.0.0.0] (5357DA75.cable.casema.nl [83.87.218.117]) by mx.google.com with ESMTPS id n31sm75059629wba.3.2010.06.18.11.30.10 (version=TLSv1/SSLv3 cipher=RC4-MD5); Fri, 18 Jun 2010 11:30:10 -0700 (PDT) Message-ID: <4C1BBB39.10308@gmail.com> Date: Fri, 18 Jun 2010 20:30:17 +0200 From: Yeb Havinga User-Agent: Thunderbird 2.0.0.24 (Windows/20100228) MIME-Version: 1.0 To: Greg Smith CC: Matthew Wakeling , Robert Haas , Eliot Gable , pgsql-performance@postgresql.org Subject: Re: B-Heaps References: <4C1BB294.8070806@2ndquadrant.com> In-Reply-To: <4C1BB294.8070806@2ndquadrant.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.9 tagged_above=-10 required=5 tests=BAYES_00=-1.9, RCVD_IN_DNSWL_NONE=-0.0001 X-Spam-Level: X-Archive-Number: 201006/339 X-Sequence-Number: 39195 Greg Smith wrote: > Matthew Wakeling wrote: >> This sort of thing has been fairly well researched at an academic >> level, but has not been implemented in that many real world >> situations. I would encourage its use in Postgres. > > I guess, but don't forget that work on PostgreSQL is driven by what > problems people are actually running into. There's a long list of > performance improvements sitting in the TODO list waiting for people > to find time to work on them, ones that we're quite certain are > useful. That anyone is going to chase after any of these speculative > ideas from academic research instead of one of those is unlikely. > Your characterization of the potential speed up here is "Using a > proper tree inside the index page would improve the CPU usage of the > index lookups", which seems quite reasonable. Regardless, when I > consider "is that something I have any reason to suspect is a > bottleneck on common workloads?", I don't think of any, and return to > working on one of things I already know is instead. > There are two different things concerning gist indexes: 1) with larger block sizes and hence, larger # entries per gist page, results in more generic keys of those pages. This in turn results in a greater number of hits, when the index is queried, so a larger part of the index is scanned. NB this has nothing to do with caching / cache sizes; it holds for every IO model. Tests performed by me showed performance improvements of over 200%. Since then implementing a speedup has been on my 'want to do list'. 2) there are several approaches to get the # entries per page down. Two have been suggested in the thread referred to by Matthew (virtual pages (but how to order these?) and tree within a page). It is interesting to see if ideas from Prokop's cache oblivous algorithms match with this problem to find a suitable virtual page format. regards, Yeb Havinga