Re: [HACKERS] procost for to_tsvector

2015-05-03 Thread Tom Lane
I wrote: Andrew Gierth and...@tao11.riddles.org.uk writes: Tom == Tom Lane t...@sss.pgh.pa.us writes: Tom and some experiments of my own, but I wonder why we are only Tom thinking of to_tsvector. Isn't to_tsquery, for example, just Tom about as expensive? What of other text search

Re: [HACKERS] procost for to_tsvector

2015-05-01 Thread Andrew Gierth
Tom == Tom Lane t...@sss.pgh.pa.us writes: In the OP, he suggested on the order of 100. Maybe we could just go with 100. Tom I'm OK with that in view of 87h9trs0zm@news-spur.riddles.org.uk Note that the results from that post suggest 100 as a bare minimum, higher values would be

Re: [HACKERS] procost for to_tsvector

2015-05-01 Thread Tom Lane
Andrew Gierth and...@tao11.riddles.org.uk writes: Tom == Tom Lane t...@sss.pgh.pa.us writes: In the OP, he suggested on the order of 100. Maybe we could just go with 100. Tom I'm OK with that in view of 87h9trs0zm@news-spur.riddles.org.uk Note that the results from that post suggest

Re: [HACKERS] procost for to_tsvector

2015-05-01 Thread Bruce Momjian
On Fri, May 1, 2015 at 09:39:43AM -0400, Robert Haas wrote: On Fri, May 1, 2015 at 9:13 AM, Bruce Momjian br...@momjian.us wrote: On Fri, May 1, 2015 at 07:57:27AM -0400, Robert Haas wrote: On Thu, Apr 30, 2015 at 9:34 PM, Bruce Momjian br...@momjian.us wrote: On Wed, Mar 11, 2015 at

Re: [HACKERS] procost for to_tsvector

2015-05-01 Thread Andres Freund
On 2015-05-01 10:03:01 -0400, Robert Haas wrote: Maybe we could just go with 100. +1 Greetings, Andres Freund -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers

Re: [HACKERS] procost for to_tsvector

2015-05-01 Thread Bruce Momjian
On Fri, May 1, 2015 at 10:03:01AM -0400, Robert Haas wrote: On Fri, May 1, 2015 at 10:01 AM, Bruce Momjian br...@momjian.us wrote: Andrew did the research to support a higher value, but even 10 should be an improvement over what we have now. Yes, I saw that, but I didn't see him

Re: [HACKERS] procost for to_tsvector

2015-05-01 Thread Robert Haas
On Fri, May 1, 2015 at 10:01 AM, Bruce Momjian br...@momjian.us wrote: Andrew did the research to support a higher value, but even 10 should be an improvement over what we have now. Yes, I saw that, but I didn't see him recommend an actual number. Can someone recommend a number now? Tom

Re: [HACKERS] procost for to_tsvector

2015-05-01 Thread Tom Lane
Robert Haas robertmh...@gmail.com writes: In the OP, he suggested on the order of 100. Maybe we could just go with 100. I'm OK with that in view of 87h9trs0zm@news-spur.riddles.org.uk and some experiments of my own, but I wonder why we are only thinking of to_tsvector. Isn't to_tsquery,

Re: [HACKERS] procost for to_tsvector

2015-05-01 Thread Robert Haas
On Thu, Apr 30, 2015 at 9:34 PM, Bruce Momjian br...@momjian.us wrote: On Wed, Mar 11, 2015 at 02:40:16PM +, Andrew Gierth wrote: An issue that comes up regularly on IRC is that text search queries, especially on relatively modest size tables or for relatively non-selective words, often

Re: [HACKERS] procost for to_tsvector

2015-05-01 Thread Bruce Momjian
On Fri, May 1, 2015 at 07:57:27AM -0400, Robert Haas wrote: On Thu, Apr 30, 2015 at 9:34 PM, Bruce Momjian br...@momjian.us wrote: On Wed, Mar 11, 2015 at 02:40:16PM +, Andrew Gierth wrote: An issue that comes up regularly on IRC is that text search queries, especially on relatively

Re: [HACKERS] procost for to_tsvector

2015-05-01 Thread Robert Haas
On Fri, May 1, 2015 at 9:13 AM, Bruce Momjian br...@momjian.us wrote: On Fri, May 1, 2015 at 07:57:27AM -0400, Robert Haas wrote: On Thu, Apr 30, 2015 at 9:34 PM, Bruce Momjian br...@momjian.us wrote: On Wed, Mar 11, 2015 at 02:40:16PM +, Andrew Gierth wrote: An issue that comes up

Re: [HACKERS] procost for to_tsvector

2015-04-30 Thread Bruce Momjian
On Wed, Mar 11, 2015 at 02:40:16PM +, Andrew Gierth wrote: An issue that comes up regularly on IRC is that text search queries, especially on relatively modest size tables or for relatively non-selective words, often misplan as a seqscan based on the fact that to_tsvector has procost=1.

Re: [HACKERS] procost for to_tsvector

2015-03-11 Thread Andrew Gierth
Tom == Tom Lane t...@sss.pgh.pa.us writes: Tom Nyet ... at least not without you actually making that argument, Tom with numbers, rather than just handwaving. We use 100 for plpgsql Tom and suchlike functions. I'd be OK with making it 10 just on Tom general principles, but claiming that

Re: [HACKERS] procost for to_tsvector

2015-03-11 Thread Jeff Janes
On Wed, Mar 11, 2015 at 2:54 PM, Andrew Gierth and...@tao11.riddles.org.uk wrote: Seq Scan on comments (cost=0.00..2406.18 rows=4140 width=792) (actual time=0.601..3946.589 rows=4056 loops=1) Bitmap Heap Scan on comments (cost=204.09..2404.30 rows=4140 width=792) (actual

[HACKERS] procost for to_tsvector

2015-03-11 Thread Andrew Gierth
An issue that comes up regularly on IRC is that text search queries, especially on relatively modest size tables or for relatively non-selective words, often misplan as a seqscan based on the fact that to_tsvector has procost=1. Clearly this cost number is ludicrous. Getting the right cost

Re: [HACKERS] procost for to_tsvector

2015-03-11 Thread Andres Freund
Hi, On 2015-03-11 14:40:16 +, Andrew Gierth wrote: An issue that comes up regularly on IRC is that text search queries, especially on relatively modest size tables or for relatively non-selective words, often misplan as a seqscan based on the fact that to_tsvector has procost=1. I've