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

From: Geoff Winkless <pgsqladmin(at)geoff(dot)dj>
To: "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 20:10:26
Message-ID: CAEzk6ffZw5RNm-PE1FfanuwnmZ8B-j-B9AJxRy4iTqe3W9seNw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 29 February 2016 at 18:31, Joshua D. Drake <jd(at)commandprompt(dot)com> wrote:
> I haven't been following this thread but did you try looking at the costs?

Thanks for the response...

> #seq_page_cost = 1.0 # measured on an arbitrary scale
> #random_page_cost = 4.0 # same scale as above
> #cpu_tuple_cost = 0.01 # same scale as above
> #cpu_index_tuple_cost = 0.005 # same scale as above
> #cpu_operator_cost = 0.0025 # same scale as above
> #effective_cache_size = 128MB
>
> Especially seq_page_cost, random_page_cost and cpu_index_tuple_cost?

seq_page_cost: 1
random_page_cost: 4
cpu_tuple_cost: 0.01
cpu_index_tuple_cost: 0.005
cpu_operator_cost: 0.0025
effective_cache_size: 3GB

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.

Geoff

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message David G. Johnston 2016-02-29 20:26:25 Re: Only owners can ANALYZE tables...seems overly restrictive
Previous Message Evgeny Morozov 2016-02-29 19:50:31 substring on bit(n) and bytea types is slow