From bf6e08c37233da372bc5570f9855df023704a93b Mon Sep 17 00:00:00 2001 From: "IceHe.xyz" Date: Wed, 25 May 2022 12:59:35 +0800 Subject: [PATCH] feat(schemas): create log indices on application id and user id (#933) --- packages/schemas/tables/logs.sql | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/schemas/tables/logs.sql b/packages/schemas/tables/logs.sql index f754883c3..e01313261 100644 --- a/packages/schemas/tables/logs.sql +++ b/packages/schemas/tables/logs.sql @@ -9,3 +9,5 @@ create table logs create index logs__type on logs (type); create index logs__created_at on logs (created_at); +create index logs__user_id on logs ((payload->>'user_id') nulls last); +create index logs__application_id on logs ((payload->>'application_id') nulls last);