PERF: Create a partial regular post_search_data index on large sites.

With the addition of `PostSearchData#private_message`, a partial
index consisting of only search data from regular posts can be created.
The partial index helps to speed up searches on large sites since PG
will not have to do an index scan on the entire search data index which
has shown to be a bottle neck.
This commit is contained in:
Guo Xiang Tan
2020-08-21 16:16:28 +08:00
committed by Alan Guo Xiang Tan
parent f7314f8ab4
commit 40c6d90df3
5 changed files with 126 additions and 17 deletions

View File

@@ -1824,6 +1824,12 @@ search:
search_recent_posts_size:
default: 100000
max: 100000
search_recent_regular_posts_offset_post_id:
default: 0
hidden: true
search_enable_recent_regular_posts_offset_size:
default: 200000
hidden: true
log_search_queries:
client: true
default: true