Re: procost for to_tsvector - Mailing list pgsql-hackers

From Jeff Janes
Subject Re: procost for to_tsvector
Date
Msg-id CAMkU=1xX_EMv2OXqM=_fA9mTFwZA-L8qrn1onFvYE_toVtG+KA@mail.gmail.com
Whole thread Raw
In response to Re: procost for to_tsvector  (Andrew Gierth <andrew@tao11.riddles.org.uk>)
List pgsql-hackers
On Wed, Mar 11, 2015 at 2:54 PM, Andrew Gierth <andrew@tao11.riddles.org.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

pgsql-hackers by date:

Previous
From: Kevin Grittner
Date:
Subject: Re: Precedence of standard comparison operators
Next
From: Peter Geoghegan
Date:
Subject: Re: Documentation of bt_page_items()'s ctid field