Open source, privacy-first web analytics. Lightweight, cookie-free Google Analytics alternative. Self-hosted or cloud.
TypeScript analyticsanalytics-dashboardclickhouseelixirgoogle-analyticsmarketingopen-source-analyticsphoenixplausible-analyticspostgresqlprivacyprivacy-friendlyself-hostedsimple-analyticsstatisticstailwindcssweb-analyticswebsite-analyticswebsite-statswebsite-tracking
Make better use of the index on sessions table
Uku Taht941a91ec220a
diff --git a/lib/plausible/stats/base.ex b/lib/plausible/stats/base.exindex 6cf84f0045..d59a741a88 100644--- a/lib/plausible/stats/base.ex+++ b/lib/plausible/stats/base.ex@@ -127,7 +127,7 @@ defmodule Plausible.Stats.Base dofrom(s in "sessions",where: s.domain == ^site.domain,- where: s.timestamp >= ^first_datetime and s.start < ^last_datetime+ where: s.start >= ^first_datetime and s.start < ^last_datetime)|> add_sample_hint(query)