repos / pico

pico services - prose.sh, pastes.sh, imgs.sh, feeds.sh, pgs.sh
git clone https://github.com/picosh/pico.git

commit
778efb6
parent
1ef7b8c
author
Eric Bower
date
2024-12-02 16:25:51 +0000 UTC
chore(analytics): add more indexes
2 files changed,  +5, -1
M Makefile
+2, -1
 1@@ -125,10 +125,11 @@ migrate:
 2 	$(DOCKER_CMD) exec -i $(DB_CONTAINER) psql -U $(PGUSER) -d $(PGDATABASE) < ./sql/migrations/20241028_add_analytics_indexes.sql
 3 	$(DOCKER_CMD) exec -i $(DB_CONTAINER) psql -U $(PGUSER) -d $(PGDATABASE) < ./sql/migrations/20241114_add_namespace_to_analytics.sql
 4 	$(DOCKER_CMD) exec -i $(DB_CONTAINER) psql -U $(PGUSER) -d $(PGDATABASE) < ./sql/migrations/20241125_add_content_type_to_analytics.sql
 5+	$(DOCKER_CMD) exec -i $(DB_CONTAINER) psql -U $(PGUSER) -d $(PGDATABASE) < ./sql/migrations/20241202_add_more_idx_analytics.sql
 6 .PHONY: migrate
 7 
 8 latest:
 9-	$(DOCKER_CMD) exec -i $(DB_CONTAINER) psql -U $(PGUSER) -d $(PGDATABASE) < ./sql/migrations/20241125_add_content_type_to_analytics.sql
10+	$(DOCKER_CMD) exec -i $(DB_CONTAINER) psql -U $(PGUSER) -d $(PGDATABASE) < ./sql/migrations/20241202_add_more_idx_analytics.sql
11 .PHONY: latest
12 
13 psql:
A sql/migrations/20241202_add_more_idx_analytics.sql
+3, -0
1@@ -0,0 +1,3 @@
2+CREATE INDEX analytics_visits_ip_addr_idx ON analytics_visits (ip_address);
3+CREATE INDEX analytics_visits_host_idx ON analytics_visits (host);
4+CREATE INDEX analytics_visits_path_idx ON analytics_visits (path);