From: Tom Lane <tgl@sss.pgh.pa.us>
To: obartunov@gmail.com
Cc: pgsql-docs@postgresql.org
Subject: Re: a little fix for text search
Date: Sat, 12 Nov 2016 16:37:05 -0500
Message-ID: <6700.1478986625@sss.pgh.pa.us> (raw)
In-Reply-To: <CAF4Au4yBWMc08FVQBA4zR_SphTgvxRWCY=dzMHWcbhgO1qGJJw@mail.gmail.com>
References: <CAF4Au4w6rrH_j1bvVhzpOsRiHCog7sGJ3LSX0tY8ZdwhHT88LQ@mail.gmail.com>
<4877.1478983756@sss.pgh.pa.us>
<CAF4Au4yBWMc08FVQBA4zR_SphTgvxRWCY=dzMHWcbhgO1qGJJw@mail.gmail.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-docs>
Oleg Bartunov <obartunov@gmail.com> writes:
> On Sat, Nov 12, 2016 at 11:49 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> I don't see why that stopped being appropriate? The point is that it
>> takes a raw text input which has to be re-parsed; that's still true
>> AFAICS.
> I mean that in the past we recommended to use subselect to avoid extra
> ts_headline() call, which now, at least at 9.6, it's obsoleted and two sql
> queries call ts_headline() exactly 5 times.
Oh, I see your point: commit 9118d03a8 fixed the planner so you don't get
extra evaluations of ts_headline() in this example. I think it's probably
still appropriate to warn that ts_headline() is expensive, but yes, the
specific example is obsolete.
regards, tom lane
--
Sent via pgsql-docs mailing list (pgsql-docs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-docs
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-docs@postgresql.org
Cc: tgl@sss.pgh.pa.us, obartunov@gmail.com
Subject: Re: a little fix for text search
In-Reply-To: <6700.1478986625@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox