From: | "Heikki Linnakangas" <heikki(at)enterprisedb(dot)com> |
---|---|
To: | Jan Urbański <j(dot)urbanski(at)students(dot)mimuw(dot)edu(dot)pl> |
Cc: | "Postgres - Hackers" <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: gsoc, oprrest function for text search take 2 |
Date: | 2008-08-14 10:03:54 |
Message-ID: | 48A4030A.5030106@enterprisedb.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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
From | Date | Subject | |
---|---|---|---|
Next Message | Simon Riggs | 2008-08-14 10:10:46 | Re: Join Removal/ Vertical Partitioning |
Previous Message | Pavel Stehule | 2008-08-14 09:56:58 | proposal sql: labeled function params |