> If it's that expensive you might consider computing and storing the
> results as an additional column in your table ... then you'd not
> have to re-evaluate it for every tuple on each SELECT ...
Thanks... Unfortunatly the 'term' will be different for every query I
can't store any precomputed values. However I figure I could do the
following for every query:
SELECT url,score_a(text, CAST('term' AS TEXT)) AS score
INTO TEMP scores
FROM articles;
SELECT url,score
FROM scores
WHERE score > 0
ORDER BY score DESC;
Now I just hope this won't cause any problems if several users try to
issue different queries at the same time?
--
Eric Jain