add SQL info on how to pimp the DB
This commit is contained in:
parent
c51c86a735
commit
647a780764
1 changed files with 18 additions and 0 deletions
18
sql/pimp_db.sql
Normal file
18
sql/pimp_db.sql
Normal file
|
@ -0,0 +1,18 @@
|
|||
|
||||
CREATE VIEW orig_repos AS
|
||||
SELECT id, name, full_name, html_url, description, last_seen
|
||||
FROM repos
|
||||
WHERE NOT fork;
|
||||
|
||||
CREATE VIEW fork_repos AS
|
||||
SELECT id, name, full_name, html_url, description, last_seen
|
||||
FROM repos
|
||||
WHERE fork
|
||||
|
||||
CREATE EXTENSION pg_trgm;
|
||||
|
||||
CREATE INDEX ix_trgm_repos_description ON
|
||||
repos USING gin (description gin_trgm_ops);
|
||||
|
||||
CREATE INDEX ix_trgm_repos_full_name ON
|
||||
repos USING gin (full_name gin_trgm_ops);
|
Loading…
Add table
Add a link
Reference in a new issue