-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
7c6a9a9
commit 70f4a19
Showing
13 changed files
with
539 additions
and
210 deletions.
There are no files selected for viewing
62 changes: 46 additions & 16 deletions
62
...69e494d99591613e6d0ffb4fc29080dc1af2.json → ...98451dda0b82e5f44906f4bb6b26ac3bab81.json
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
12 changes: 12 additions & 0 deletions
12
web/.sqlx/query-8f3ff1b848842b6c90ab9c4487bc744ee666517800ad9b9ce35570abdb993dec.json
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
DROP INDEX travel_states_time_idx; | ||
ALTER TABLE travel_states DROP CONSTRAINT travel_states_pkey; | ||
CREATE UNIQUE INDEX travel_states_pkey ON travel_states(world_id, time DESC); | ||
|
||
DROP INDEX world_statuses_time_idx; | ||
ALTER TABLE world_statuses DROP CONSTRAINT world_statuses_pkey; | ||
CREATE UNIQUE INDEX world_statuses_pkey ON world_statuses(world_id, time DESC); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
CREATE MATERIALIZED VIEW IF NOT EXISTS world_summary AS | ||
SELECT | ||
w.world_id, | ||
w.world_name, | ||
w.datacenter_id, | ||
w.datacenter_name, | ||
w.region_id, | ||
w.region_abbreviation, | ||
w.region_name, | ||
ws.status, | ||
ws.category, | ||
ws.can_create, | ||
ts.prohibit, | ||
qe.time, | ||
qe.size, | ||
qe.duration | ||
FROM | ||
worlds w | ||
INNER JOIN ( | ||
SELECT | ||
DISTINCT ON (world_id) world_id, | ||
prohibit | ||
FROM | ||
travel_states | ||
ORDER BY | ||
world_id, | ||
time DESC | ||
) ts ON w.world_id = ts.world_id | ||
INNER JOIN ( | ||
SELECT | ||
DISTINCT ON (world_id) world_id, | ||
status, | ||
category, | ||
can_create | ||
FROM | ||
world_statuses | ||
ORDER BY | ||
world_id, | ||
time DESC | ||
) ws ON w.world_id = ws.world_id | ||
INNER JOIN ( | ||
SELECT | ||
* | ||
FROM | ||
queue_estimates | ||
) qe ON w.world_id = qe.world_id | ||
WHERE | ||
w.hidden = FALSE; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.