postgresql/src
Tom Lane 2503982be4 Improve procost estimates for some text search functions.
The text search functions that involve parsing raw text into lexemes are
remarkably CPU-intensive, so estimating them at the same cost as most other
built-in functions seems like a mistake; moreover, doing so turns out to
discourage the optimizer from using functional indexes on these functions.
After some debate, we've agreed to raise procost from 1 to 100 for
to_tsvector(), plainto_tsvector(), to_tsquery(), ts_headline(),
ts_match_tt(), and ts_match_tq(), which are all the text search functions
that parse raw text.

Also increase procost for the 2-argument form of ts_rewrite()
(tsquery_rewrite_query); while this function doesn't do text parsing,
it does execute a user-supplied SQL query, so its previous procost of 1 is
clearly a drastic underestimate.  It seems reasonable to assign it the same
cost we assign to PL functions by default, so 100 is the number here too.

I did not bother bumping catversion for this change, since it does not
break catalog compatibility with the server executable nor result in
any regression test changes.

Per complaint from Andrew Gierth and subsequent discussion.
2015-05-04 15:38:57 -04:00
..
backend Recursively fsync() the data directory after a crash. 2015-05-04 14:13:53 -04:00
bin Combine initdb tests that successfully create a data directory. 2015-05-02 16:47:28 -04:00
common Reorganize our CRC source files again. 2015-04-14 17:03:42 +03:00
include Improve procost estimates for some text search functions. 2015-05-04 15:38:57 -04:00
interfaces Fix parallel make risk with new check temp-install setup 2015-04-29 20:34:22 -04:00
makefiles Fix parallel make risk with new check temp-install setup 2015-04-29 20:34:22 -04:00
pl Fix python_includespec on Windows at configure time 2015-05-03 08:17:04 -04:00
port Fix various typos and grammar errors in comments. 2015-04-26 18:42:31 +02:00
template Remove duplicate specification of -Ae for HP-UX C compiler. 2015-01-13 22:52:11 -05:00
test Fix overlooked relcache invalidation in ALTER TABLE ... ALTER CONSTRAINT. 2015-05-03 11:30:24 -04:00
timezone Update time zone data files to tzdata release 2015a. 2015-01-30 22:45:44 -05:00
tools Enable transforms tests for python 2 on MSVC builds 2015-04-29 13:49:24 -04:00
tutorial Update copyright for 2015 2015-01-06 11:43:47 -05:00
.gitignore
DEVELOPERS
Makefile Create libpgcommon, and move pg_malloc et al to it 2013-02-12 11:21:05 -03:00
Makefile.global.in Move interpreter shared library detection to configure 2015-05-01 21:38:21 -04:00
Makefile.shlib Add transforms feature 2015-04-26 10:33:14 -04:00
bcc32.mak Autoconfiscate selection of 64-bit int type for 64-bit large object API. 2012-10-07 21:52:43 -04:00
nls-global.mk Setup error context callback for transaction lock waits 2014-03-19 15:10:36 -03:00
win32.mak Autoconfiscate selection of 64-bit int type for 64-bit large object API. 2012-10-07 21:52:43 -04:00