From: | Alexander Korotkov <aekorotkov(at)gmail(dot)com> |
---|---|
To: | Tomas Vondra <tv(at)fuzzy(dot)cz> |
Cc: | pgsql-hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: GIN improvements part2: fast scan |
Date: | 2014-01-24 06:38:08 |
Message-ID: | CAPpHfds0C-tvEvmLbuQrbbptp3sx2WhH=eM0mcArFWtHZNDUUA@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Fri, Jan 24, 2014 at 6:48 AM, Tomas Vondra <tv(at)fuzzy(dot)cz> wrote:
> I plan to do more thorough testing over the weekend, but I'd like to
> make sure I understand what to expect. My understanding is that this
> patch should:
>
> - give the same results as the current code (e.g. the fulltext should
> not return different rows / change the ts_rank etc.)
>
> - improve the performance of fulltext queries
>
> Are there any obvious rules what queries will benefit most from this?
> The queries generated by the tool I'm using for testing are mostly of
> this form:
>
> SELECT id FROM messages
> WHERE body_tsvector @ plainto_tsquery('english', 'word1 word2 ...')
> ORDER BY ts_rank(...) DESC LIMIT :n;
>
> with varying number of words and LIMIT values. During the testing today
> I haven't noticed any obvious performance difference, but I haven't
> spent much time on that.
>
These patches optimizes only query with multiple WHERE clauses. For
instance:
SELECT id FROM messages
WHERE body_tsvector @ plainto_tsquery('english', 'word1')
AND body_tsvector @ plainto_tsquery('english', 'word2')
ORDER BY ts_rank(...) DESC LIMIT :n;
Optimizations inside single clause will be provided as separate patch.
------
With best regards,
Alexander Korotkov.
From | Date | Subject | |
---|---|---|---|
Next Message | Sergey Muraviov | 2014-01-24 07:08:34 | Re: extension_control_path |
Previous Message | Marco Atzeri | 2014-01-24 06:20:19 | Re: Postgresql for cygwin - 3rd |