Re: multicolumn index and setting effective_cache_size using human-readable-numbers

From: Kevin Grittner <kgrittn(at)gmail(dot)com>
To: Geoff Winkless <pgsqladmin(at)geoff(dot)dj>
Cc: "Joshua D(dot) Drake" <jd(at)commandprompt(dot)com>, Postgres General <pgsql-general(at)postgresql(dot)org>
Subject: Re: multicolumn index and setting effective_cache_size using human-readable-numbers
Date: 2016-02-29 22:47:35
Message-ID: CACjxUsPRn0_xiB2f=0Rm9AGSQdgLDqR6JziA+-2Y8pJ6WKKoBg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Mon, Feb 29, 2016 at 2:10 PM, Geoff Winkless <pgsqladmin(at)geoff(dot)dj> wrote:

> I'm not really sure what changes I could make that would make one
> index that's ostensibly equivalent to the other not be attractive to
> the planner though. I can mess with those figures but as I said before
> the only one that flicks the switch is to change effective_cache_size
> to 8GB, which makes no sense to me.

effective_cache_size doesn't affect how memory is allocated, it
tells the optimizer what to assume about the combined cache space
(essentially shared_buffers + OS cache) so that it can estimate the
amount of random storage I/O needed to use an indexed plan. If you
tell it that you only have 64MB between those two types of cache,
it will assume that the index (particularly if it is deep and/or
wide) will be very expensive.

--
Kevin Grittner
EDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Geoff Winkless 2016-02-29 23:02:25 Re: multicolumn index and setting effective_cache_size using human-readable-numbers
Previous Message David G. Johnston 2016-02-29 22:35:39 Re: Function fixing - PostgreSQL 9.2