Re: Weirdly pesimistic estimates in optimizer

From: Jim Nasby <Jim(dot)Nasby(at)BlueTreble(dot)com>
To: David Kubečka <kubecka(dot)dav(at)gmail(dot)com>, <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Weirdly pesimistic estimates in optimizer
Date: 2015-03-06 01:58:01
Message-ID: 54F909A9.8000102@BlueTreble.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 2/28/15 12:01 PM, David Kubečka wrote:
> With 'random_fk_dupl':
> -> Index Scan using facts_fk_idx on facts (cost=0.42..5.75
> rows=100 width=15) (actual time=0.009..0.117 rows=98 loops=100)
> With 'random_fk_uniq':
> -> Index Scan using facts_fk_idx on facts (cost=0.42..214.26
> rows=100 width=15) (actual time=0.007..0.109 rows=98 loops=100)
>
> I have read the optimizer README file and also looked briefly at the
> code, but this seems to be something not related to particular
> implementation of algorithm (e.g. nested loop). Perhaps it's the way how
> cost estimates are propagated down (or sideways? that would be weird...)
> the query tree. But I am really not sure, since this is my first time
> lookng at the optimizer code base. I should also add that I have
> reproduced this behaviour for all versions of Pg from 9.2 up to current
> devel.

This got answered on one of the other lists, right?
--
Jim Nasby, Data Architect, Blue Treble Consulting
Data in Trouble? Get it in Treble! http://BlueTreble.com

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Jim Nasby 2015-03-06 02:07:26 Re: Proposal : REINDEX xxx VERBOSE
Previous Message David G Johnston 2015-03-06 01:30:52 Re: object description for FDW user mappings