mirror of
https://github.com/umami-software/umami.git
synced 2025-12-06 01:18:00 +01:00
add projection code
This commit is contained in:
parent
9882ff24f6
commit
61dfa1391e
1 changed files with 16 additions and 1 deletions
|
|
@ -170,4 +170,19 @@ GROUP BY website_id,
|
|||
subdivision1,
|
||||
city,
|
||||
event_type,
|
||||
timestamp);
|
||||
timestamp);
|
||||
|
||||
-- projections
|
||||
ALTER TABLE umami.website_event
|
||||
ADD PROJECTION website_event_url_path_projection (
|
||||
SELECT * ORDER BY toStartOfDay(created_at), website_id, url_path, created_at
|
||||
);
|
||||
|
||||
ALTER TABLE umami.website_event MATERIALIZE PROJECTION website_event_url_path_projection;
|
||||
|
||||
ALTER TABLE umami.website_event
|
||||
ADD PROJECTION website_event_referrer_domain_projection (
|
||||
SELECT * ORDER BY toStartOfDay(created_at), website_id, referrer_domain, created_at
|
||||
);
|
||||
|
||||
ALTER TABLE umami.website_event MATERIALIZE PROJECTION website_event_referrer_domain_projection;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue