Re: procost for to_tsvector

From: Jeff Janes <jeff(dot)janes(at)gmail(dot)com>
To: Andrew Gierth <andrew(at)tao11(dot)riddles(dot)org(dot)uk>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Andres Freund <andres(at)2ndquadrant(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: procost for to_tsvector
Date: 2015-03-11 22:22:24
Message-ID: CAMkU=1xX_EMv2OXqM=_fA9mTFwZA-L8qrn1onFvYE_toVtG+KA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, Mar 11, 2015 at 2:54 PM, Andrew Gierth <andrew(at)tao11(dot)riddles(dot)org(dot)uk>
wrote:

> Seq Scan on comments (cost=0.00..2406.18 rows=4140 width=792) (actual
> time=0.601..3946.589 rows=4056 loops=1)
>

> Bitmap Heap Scan on comments (cost=204.09..2404.30 rows=4140 width=792)
> (actual time=2.401..11.564 rows=4056 loops=1)
>

...

> (strangely, the seqscan plan is picked despite having a cost more than a
> point higher? what's up with that?)
>

It is probably this, from src/backend/optimizer/util/pathnode.c :

costcmp = compare_path_costs_fuzzily(new_path, old_path, 1.01,
parent_rel->consider_startup);

Cheers,

Jeff

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Geoghegan 2015-03-11 22:57:48 Re: Documentation of bt_page_items()'s ctid field
Previous Message Kevin Grittner 2015-03-11 22:19:39 Re: Precedence of standard comparison operators