Skip to content

Commit 9ac0f3e

Browse files
committed
fix(stats): better stat table periods, provider/model norm
1 parent cf2cd13 commit 9ac0f3e

17 files changed

Lines changed: 6823 additions & 234 deletions

File tree

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
ALTER TABLE `geo_stat` ADD `provider` varchar(128) DEFAULT 'all' NOT NULL;--> statement-breakpoint
2+
ALTER TABLE `geo_stat` ADD `model` varchar(256) DEFAULT 'all' NOT NULL;--> statement-breakpoint
3+
ALTER TABLE `geo_stat` DROP INDEX `uniq_country_period`;--> statement-breakpoint
4+
CREATE UNIQUE INDEX `uniq_country_period` ON `geo_stat` (`grain`,`period_start`,`dataset`,`tier`,`client`,`source`,`provider`,`model`,`country`);--> statement-breakpoint
5+
CREATE INDEX `idx_country_model` ON `geo_stat` (`model`,`country`,`grain`,`period_start`);

0 commit comments

Comments
 (0)