From c4cd65932157de98124df91eddfc8d2c4b3e22d4 Mon Sep 17 00:00:00 2001 From: Graham McInitre Date: Thu, 16 Jul 2026 07:20:03 -0500 Subject: [PATCH] perf: add index on pskr_spots_hourly.last_spot_at for /pskreporter ORDER BY --- .../migrations/20260716121941_add_last_spot_at_index.exs | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 priv/repo/migrations/20260716121941_add_last_spot_at_index.exs diff --git a/priv/repo/migrations/20260716121941_add_last_spot_at_index.exs b/priv/repo/migrations/20260716121941_add_last_spot_at_index.exs new file mode 100644 index 00000000..e7c0c8be --- /dev/null +++ b/priv/repo/migrations/20260716121941_add_last_spot_at_index.exs @@ -0,0 +1,7 @@ +defmodule Microwaveprop.Repo.Migrations.AddLastSpotAtIndex do + use Ecto.Migration + + def change do + create index(:pskr_spots_hourly, ["last_spot_at DESC NULLS LAST"]) + end +end