Re: gsoc, oprrest function for text search take 2

From: Jan Urbański <j(dot)urbanski(at)students(dot)mimuw(dot)edu(dot)pl>
To: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
Cc: Heikki Linnakangas <heikki(at)enterprisedb(dot)com>, Postgres - Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: gsoc, oprrest function for text search take 2
Date: 2008-08-14 21:42:38
Message-ID: 48A4A6CE.5010406@students.mimuw.edu.pl
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Alvaro Herrera wrote:
> Jan Urbański wrote:
>> Heikki Linnakangas wrote:
>
>>> Sounds like a plan. In (2), it's even better to detoast the values
>>> lazily. For a typical one-word tsquery, the binary search will only
>>> look at a small portion of the elements.
>> Hm, how can I do that? Toast is still a bit black magic to me... Do you
>> mean I should stick to having Datums in TextFreq?
>
> Store both the Datum and the text *. If the latter is NULL, then grab
> the datum, detoast and store the result in the text *. Next time you
> need to look at it, it's already detoasted.

Yeah, I got that idea, but then I thought the chances of touching the
same element during binary search twice were very small. Especially now
when the detoasting occurs only when we hit a text Datum that has the
same length as the sought lexeme.
Still, I can do it if people feel like it.

Cheers,
Jan

--
Jan Urbanski
GPG key ID: E583D7D2

ouden estin

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Alvaro Herrera 2008-08-14 22:05:59 Re: gsoc, oprrest function for text search take 2
Previous Message Alvaro Herrera 2008-08-14 21:33:04 Re: gsoc, oprrest function for text search take 2