Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1c5fzR-0000sj-Cx for pgsql-docs@arkaria.postgresql.org; Sat, 12 Nov 2016 21:37:33 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1c5fzQ-0006eD-Vo for pgsql-docs@arkaria.postgresql.org; Sat, 12 Nov 2016 21:37:33 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1c5fz4-0006Fe-Q1 for pgsql-docs@postgresql.org; Sat, 12 Nov 2016 21:37:10 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1c5fz2-0004nN-16 for pgsql-docs@postgresql.org; Sat, 12 Nov 2016 21:37:10 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id uACLb5cp006701; Sat, 12 Nov 2016 16:37:05 -0500 From: Tom Lane To: obartunov@gmail.com cc: pgsql-docs@postgresql.org Subject: Re: a little fix for text search In-reply-to: References: <4877.1478983756@sss.pgh.pa.us> Comments: In-reply-to Oleg Bartunov message dated "Sun, 13 Nov 2016 00:01:46 +0300" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <6699.1478986625.1@sss.pgh.pa.us> Date: Sat, 12 Nov 2016 16:37:05 -0500 Message-ID: <6700.1478986625@sss.pgh.pa.us> X-Pg-Spam-Score: -4.8 (----) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-docs Precedence: bulk Sender: pgsql-docs-owner@postgresql.org Oleg Bartunov writes: > On Sat, Nov 12, 2016 at 11:49 PM, Tom Lane 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