Re: gsoc, text search selectivity and dllist enhancments - Mailing list pgsql-hackers

From Tom Lane
Subject Re: gsoc, text search selectivity and dllist enhancments
Date
Msg-id 23365.1215186836@sss.pgh.pa.us
Whole thread Raw
In response to Re: gsoc, text search selectivity and dllist enhancments  ("Heikki Linnakangas" <heikki@enterprisedb.com>)
Responses Re: gsoc, text search selectivity and dllist enhancments  ("Heikki Linnakangas" <heikki@enterprisedb.com>)
List pgsql-hackers
"Heikki Linnakangas" <heikki@enterprisedb.com> writes:
> Tom Lane wrote:
>> The data structure I'd suggest is a simple array of pointers
>> to the underlying hash table entries.  Since you have a predetermined
>> maximum number of lexemes to track, you can just palloc the array once
>> --- you don't need the expansibility properties of a list. 

> The number of lexemes isn't predetermined. It's 2 * (longest tsvector 
> seen so far), and we don't know beforehand how long the longest tsvector is.

Hmm, I had just assumed without looking too closely that it was stats
target times a fudge factor.  What is the rationale for doing it as
above?  I don't think I like the idea of the limit varying over the
course of the scan --- that means that lexemes in different places
in the input will have significantly different probabilities of
surviving to the final result.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: Review: DTrace probes (merged version)
Next
From: Tom Lane
Date:
Subject: Re: [PATCHES] Explain XML patch v2