added ability to check shared devices
This commit is contained in:
parent
7d0daef923
commit
72db66d4aa
14 changed files with 456 additions and 23 deletions
|
|
@ -0,0 +1 @@
|
|||
DROP INDEX IF EXISTS idx_authorizations_device_fingerprint;
|
||||
|
|
@ -0,0 +1,10 @@
|
|||
-- Supports the admin console's "accounts sharing a device" report, which
|
||||
-- groups authorizations by (device_model, system_version, platform, ip) and
|
||||
-- looks for groups spanning more than one distinct user_id. Without this
|
||||
-- index that GROUP BY is a full sequential scan of authorizations, a table
|
||||
-- that grows roughly with active-session count and is never pruned except on
|
||||
-- explicit revoke.
|
||||
|
||||
CREATE INDEX idx_authorizations_device_fingerprint
|
||||
ON public.authorizations (device_model, system_version, platform, ip)
|
||||
WHERE device_model <> '';
|
||||
Loading…
Add table
Add a link
Reference in a new issue