Homec4science

Improve performance of empty search

Authored by vrana <jakubv@fb.com> on Apr 18 2012, 23:38.

Description

Improve performance of empty search

Summary:
Searching for empty query kills us because whole search_document table is read in this case.

This diff adds an index just for this query.

Other solution would be to disable searching for empty string. But it can be actually useful (listing newest documents of any type).

Test Plan:

EXPLAIN SELECT document.phid, document.documentType, document.documentTitle, document.documentCreated
FROM `search_document` document
GROUP BY document.phid
ORDER BY documentCreated DESC
LIMIT 0, 21;

Reviewers: epriestley

Reviewed By: epriestley

CC: jungejason, aran, Koolvin

Differential Revision: https://secure.phabricator.com/D2277

Details

Committed
vrana <jakubv@fb.com>Apr 18 2012, 23:51
Pushed
aubortJan 31 2017, 17:16
Parents
rPHbdcba43f212a: Formalize a mechanism for marking Conduit methods deprecated/unstable
Branches
Unknown
Tags
Unknown

Event Timeline

vrana <jakubv@fb.com> committed rPH204b6694af1a: Improve performance of empty search (authored by vrana <jakubv@fb.com>).Apr 18 2012, 23:51