Skip site navigation (1) Skip section navigation (2)

Re: tsvector_update_trigger performance?

From: Chris St Denis <lists(at)on-track(dot)ca>
To: Dimitri Fontaine <dfontaine(at)hi-media(dot)com>
Cc: Alvaro Herrera <alvherre(at)commandprompt(dot)com>, Oleg Bartunov <oleg(at)sai(dot)msu(dot)su>, pgsql-performance(at)postgresql(dot)org
Subject: Re: tsvector_update_trigger performance?
Date: 2009-06-25 04:03:08
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-performance
Dimitri Fontaine wrote:
> Hi,
> Le 24 juin 09 à 18:29, Alvaro Herrera a écrit :
>> Oleg Bartunov wrote:
>>> On Wed, 24 Jun 2009, Chris St Denis wrote:
>>>> Is tsvector_update_trigger() smart enough to not bother updating a
>>>> tsvector if the text in that column has not changed?
>>> no, you should do check yourself. There are several examples in 
>>> mailing lists.
>> Or you could try using the supress_redundant_updates_trigger() function
>> that has been included in 8.4 (should be easy to backport)
> But it won't handle the case where some other random column has 
> changed, but the UPDATE is not affecting the text indexed...
Tho this looks useful for some things, it doesn't solve my specific 
problem any. But thanks for the suggestion anyway.

This sounds like something that should just be on by default, not a 
trigger. Is there some reason it would waste the io of writing a new row 
to disk if nothing has changed? or is it just considered too much 
unnecessary overhead to compare them?

In response to


pgsql-performance by date

Next:From: Craig RingerDate: 2009-06-25 05:45:19
Subject: Re: tsvector_update_trigger performance?
Previous:From: Dimitri FontaineDate: 2009-06-24 20:03:21
Subject: Re: tsvector_update_trigger performance?

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group