mirror of
https://github.com/neondatabase/neon.git
synced 2026-01-17 10:22:56 +00:00
learnings from today
This commit is contained in:
@@ -10,9 +10,14 @@ CREATE TABLE scrapes (
|
||||
create index scrapes_tenant_id_idx on scrapes (tenant_id);
|
||||
create index scrapes_timeline_id_idx on scrapes (timeline_id);
|
||||
create index scrapes_scrape_ts_idx on scrapes (scrape_ts);
|
||||
create index scrapes_tenant_timeline_id_idx on scrapes (tenant_id, timeline_id);
|
||||
create index scrapes_tenant_timeline_id_idx on scrapes (tenant_id, timeline_id); -- this can probably go
|
||||
create index timeline_scrape_ts_idx on scrapes (timeline_id, scrape_ts);
|
||||
create index tenant_timeline_scrape_ts_idx on scrapes (tenant_id, timeline_id, scrape_ts);
|
||||
create index pageserver_id_idx on scrapes (pageserver_id);
|
||||
|
||||
-- add statistics so that query planner selects the tenant_timeline_scrape_ts idx
|
||||
create statistics scrapes_tenant_timeline_stats on tenant_id, timeline_id from scrapes;
|
||||
|
||||
--- what follows are example queries ---
|
||||
|
||||
--- how many layer accesses did we have per layers/timeline/tenant in the last 30 seconds
|
||||
|
||||
Reference in New Issue
Block a user