Re: default_text_search_config and expression indexes - Mailing list pgsql-hackers

From Ron Mayer
Subject Re: default_text_search_config and expression indexes
Date
Msg-id 46B102C0.4060100@cheapcomplexdevices.com
Whole thread Raw
In response to Re: default_text_search_config and expression indexes  (Bruce Momjian <bruce@momjian.us>)
Responses Re: default_text_search_config and expression indexes  (Bruce Momjian <bruce@momjian.us>)
List pgsql-hackers
Bruce Momjian wrote:
> Ron Mayer wrote:
>> Bruce Momjian wrote:
>>> Oleg Bartunov wrote:
>>>> What is a basis of your assumption ? 
>> I think I asked about this kind of usage a couple years back;...
>>
>> http://archives.postgresql.org/pgsql-general/2005-10/msg00475.php
>> http://archives.postgresql.org/pgsql-general/2005-10/msg00477.php
>>
>> ...why the functional index was
>> slower than maintaining the extra column; with the explanation
>> that the lossy index having to call the function (including
>> parsing, dictionary lookup, etc) for re-checking the data ...
>> ...
>>>
>>> Are you saying the majority of users have a separate column with a
>>> trigger?
>> I think so.   At least when I was using it in 2005 the second
>> column with the trigger was faster than using a functional index.
> 
> OK, it is good you measured it.  I wonder how GIN would behave because
> it is not lossy.

Too bad I don't have the same database around anymore.
It seems the re-parsing for re-checking for the lossy index was very
expensive, tho.
In the end, I suspect it depends greatly on what fraction of rows match.

>>>> We need more feedback from users.
>>> Well, I am waiting for other hackers to get involved, but if they don't,
>>> I have to evaluate it myself on the email lists.
>> Personally, I think documentation changes would be an OK way to
>> to handle it.   Something that makes it extremely clear to the
>> user the advantages of having the extra column and the risks
>> of avoiding them.
> 
> Sure, but you have make sure you use the right configuration in the
> trigger, no?  Does the tsquery have to use the same configuration?

I wish I knew this myself. :-)   Whatever I had done happened to work
but that was largely through people on IRC walking me through it.


pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: default_text_search_config and expression indexes
Next
From: Bruce Momjian
Date:
Subject: Re: default_text_search_config and expression indexes