Received: from maia.hub.org (maia-3.hub.org [200.46.204.243]) by mail.postgresql.org (Postfix) with ESMTP id ABFD7B5DBD1 for ; Mon, 16 May 2011 16:11:09 -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 44270-05 for ; Mon, 16 May 2011 19:11:02 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-gx0-f174.google.com (mail-gx0-f174.google.com [209.85.161.174]) by mail.postgresql.org (Postfix) with ESMTP id 747C1B5DBBC for ; Mon, 16 May 2011 16:11:02 -0300 (ADT) Received: by gxk21 with SMTP id 21so1624733gxk.19 for ; Mon, 16 May 2011 12:11:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc:content-type; bh=OxxultlBZPmPOdGsZZAmM81JLSHwEzz6Rj+3v2+bE2s=; b=L1DICqKQc+mjkH+SfVM4G4UxrCUFBOb0d/EmnJ8Ei4hqj4PeSJehwJRwBtDLGKztVS zd5UeHDrGMjDPh63elBTcX917IQI1nT6o//4NakAgP8NaZ7f88rmsmdwSZR6qkObLnJy 92sIPOmMZAo+2/8esCDvbT/rS9dDJq35LikQA= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; b=rEdQUQu5CJLxmYadArqwFQ2n+RDuFZCiq3w7Tu38JQV7s1zNDRL4tSrpjeXI3Zeo5Q aIfQfOD6Li0CHyO9Jps67i9M3a+0FrmZCymSDJHj8idwzp6F9A84HVfJLwD/jy2oVDhx KFWaLoea8Tlgz60O+PseHo9vjNSe33BhHyTas= Received: by 10.90.188.16 with SMTP id l16mr3540271agf.88.1305573061452; Mon, 16 May 2011 12:11:01 -0700 (PDT) MIME-Version: 1.0 Received: by 10.91.162.35 with HTTP; Mon, 16 May 2011 12:10:37 -0700 (PDT) In-Reply-To: <18337.1305566693@sss.pgh.pa.us> References: <4DB6F4BB020000250003CEB9@gw.wicourts.gov> <2823.1305314437@sss.pgh.pa.us> <4DCD90F5.2010501@agliodbs.com> <4DD0195A.9040305@agliodbs.com> <4DD07855.8080907@postnewspapers.com.au> <4DD07B4E.1020503@2ndquadrant.com> <4DD0AB16.5060808@krogh.cc> <4DD0ACD0.1090801@krogh.cc> <18337.1305566693@sss.pgh.pa.us> From: Nathan Boley Date: Mon, 16 May 2011 12:10:37 -0700 Message-ID: Subject: Re: reducing random_page_cost from 4 to 2 to force index scan To: Tom Lane Cc: Jeff Janes , Jesper Krogh , pgsql-performance@postgresql.org Content-Type: text/plain; charset=ISO-8859-1 X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.898 tagged_above=-10 required=5 tests=BAYES_00=-1.9, FREEMAIL_FROM=0.001, RFC_ABUSE_POST=0.001 X-Spam-Level: X-Archive-Number: 201105/249 X-Sequence-Number: 43758 > The accesses to an index are far more likely to be clustered than the > accesses to the underlying table, because the index is organized in a > way that's application-meaningful and the table not so much. So, to clarify, are you saying that if query were actually requesting rows uniformly random, then there would be no reason to suspect that index accesses would have hotspots? It seems like the index structure ( ie, the top node in b-trees ) could also get in the way. Best, Nathan