Re: gsoc, oprrest function for text search take 2 - Mailing list pgsql-hackers

From Heikki Linnakangas
Subject Re: gsoc, oprrest function for text search take 2
Date
Msg-id 48A4030A.5030106@enterprisedb.com
Whole thread Raw
In response to Re: gsoc, oprrest function for text search take 2  (Jan Urbański <j.urbanski@students.mimuw.edu.pl>)
Responses Re: gsoc, oprrest function for text search take 2  (Jan Urbański <j.urbanski@students.mimuw.edu.pl>)
Re: gsoc, oprrest function for text search take 2  (Jan Urbański <j.urbanski@students.mimuw.edu.pl>)
List pgsql-hackers
Jan Urbański wrote:
> So right now the idea is to:
>  (1) pre-sort STATISTIC_KIND_MCELEM values
>  (2) build an array of pointers to detoasted values in tssel()
>  (3) use binary search when looking for MCELEMs during tsquery analysis

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.

Another thing is, how significant is the time spent in tssel() anyway, 
compared to actually running the query? You ran pgbench on EXPLAIN, 
which is good to see where in tssel() the time is spent, but if the time 
spent in tssel() is say 1% of the total execution time, there's no point 
optimizing it further.

--   Heikki Linnakangas  EnterpriseDB   http://www.enterprisedb.com


pgsql-hackers by date:

Previous
From: Simon Riggs
Date:
Subject: Re: Join Removal/ Vertical Partitioning
Next
From: Simon Riggs
Date:
Subject: Re: WIP: patch to create explicit support for semi and anti joins