search: add table with recent queries
View options
- Truncate descriptions
Created by: ijt
Feature request description
Add a table like
CREATE TABLE searches (
id serial PRIMARY KEY,
query text NOT NULL,
created_at date DEFAULT NOW()
);
and add a row to it whenever a search query runs. Also, add a database trigger to remove old rows if the table grows beyond a certain size, say 100k rows.
Is your feature request related to a problem? If so, please describe.
We don't yet have good visibility into commonly run queries.
Describe alternatives you've considered.
One possibility would be to mine the logs, but that's less convenient than having a table to query.
Additional context
This is needed for #2879 (closed).