Received: from maia.hub.org (maia-5.hub.org [200.46.204.29]) by mail.postgresql.org (Postfix) with ESMTP id 7D3E063371F for ; Tue, 15 Jun 2010 16:33:20 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.29]) (amavisd-maia, port 10024) with ESMTP id 11290-08-3 for ; Tue, 15 Jun 2010 19:33:12 +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 BB10D6333F5 for ; Tue, 15 Jun 2010 16:33:11 -0300 (ADT) Received: by wyb40 with SMTP id 40so5116435wyb.19 for ; Tue, 15 Jun 2010 12:33:09 -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=cw7qY0PBT/Zw9OE7HCz5VreFeb5xg5ZLNNxHrqHCe28=; b=kso4xFCeUOvaTC7q+gmzfz+brHpHE1DZZ7nGLIW9YKrU9J7kGTLDrYsMuPj7Yar8t0 /MLxDHQQM5+0MhBSN5Idr+Ui+MxOsI1BAngxiZdiMEWveM7DsZTLtJRMAYP0f53L6yF5 0ECbO+vgR5KS2OhhvCWL+IvLdIhmu+mkNlRWQ= 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=qANryHdeV96jIjq/jwE9WcTMvEV3/Co6udUJMBL5eFgz6wOPcRgwvHgdbvhnmVRksL eSw1T4jNuzgHbWL49WxKHxecOZkjaNiZQXrpMXC7VqrpIBmPvhDPMMZgQLfmjHed4q4v 41z0+CAcfNHyNrzR4CcoaVEaYCTuOokrkEFPM= Received: by 10.227.127.131 with SMTP id g3mr7496704wbs.129.1276630389402; Tue, 15 Jun 2010 12:33:09 -0700 (PDT) Received: from [0.0.0.0] (5357DA75.cable.casema.nl [83.87.218.117]) by mx.google.com with ESMTPS id u36sm48219744wbv.12.2010.06.15.12.33.08 (version=TLSv1/SSLv3 cipher=RC4-MD5); Tue, 15 Jun 2010 12:33:08 -0700 (PDT) Message-ID: <4C17D572.2030305@gmail.com> Date: Tue, 15 Jun 2010 21:33:06 +0200 From: Yeb Havinga User-Agent: Thunderbird 2.0.0.24 (Windows/20100228) MIME-Version: 1.0 To: Greg Smith CC: Eliot Gable , pgsql-performance@postgresql.org Subject: Re: B-Heaps References: <4C17206B.9030606@2ndquadrant.com> In-Reply-To: <4C17206B.9030606@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=-0.001 tagged_above=-10 required=5 tests=BAYES_40=-0.001, RCVD_IN_DNSWL_NONE=-0.0001 X-Spam-Level: X-Archive-Number: 201006/274 X-Sequence-Number: 39130 Greg Smith wrote: > Eliot Gable wrote: >> Just curious if this would apply to PostgreSQL: >> http://queue.acm.org/detail.cfm?id=1814327 > > It's hard to take this seriously at all when it's so ignorant of > actual research in this area. Take a look at > http://www.cc.gatech.edu/~bader/COURSES/UNM/ece637-Fall2003/papers/BFJ01.pdf > for a second Interesting paper, thanks for the reference! > PostgreSQL is modeling a much more complicated situation where there > are many levels of caches, from CPU to disk. When executing a query, > the database tries to manage that by estimating the relative costs for > CPU operations, row operations, sequential disk reads, and random disk > reads. Those fundamental operations are then added up to build more > complicated machinery like sorting. To minimize query execution cost, > various query plans are considered, the cost computed for each one, > and the cheapest one gets executed. This has to take into account a > wide variety of subtle tradeoffs related to whether memory should be > used for things that would otherwise happen on disk. There are three > primary ways to search for a row, three main ways to do a join, two > for how to sort, and they all need to have cost estimates made for > them that balance CPU time, memory, and disk access. Do you think that the cache oblivious algorithm described in the paper could speed up index scans hitting the disk Postgres (and os/hardware) multi level memory case? (so e.g. random page cost could go down?) regards, Yeb Havinga