Cache stats in the database (and auto-update them from cron)
This commit is contained in:
parent
f6564dfd9c
commit
0738583243
3 changed files with 18 additions and 5 deletions
|
|
@ -56,6 +56,8 @@ CREATE INDEX ON man (name);
|
|||
CREATE TABLE man_index AS SELECT DISTINCT name, section FROM man;
|
||||
CREATE INDEX ON man_index USING btree(lower(name) text_pattern_ops);
|
||||
|
||||
CREATE TABLE stats_cache AS SELECT count(distinct hash) AS hashes, count(distinct name) AS mans, count(*) AS files, count(distinct package) AS packages FROM man;
|
||||
|
||||
|
||||
INSERT INTO systems (id, name, release, short, relorder) VALUES
|
||||
(1, 'Arch Linux', NULL, 'arch', 0),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue