.order("revoked_at DESC NULLS FIRST, created_at DESC")
I think the ordering above will help PG come up with a better plan without having to scan the whole table.
Just want to confirm this field is being used by the client because I did a quick scan and it doesn’t seem like the client consumes this field.
Minor but I’m not sure if the limit needs to be customizable by the client.
That looks better, thanks!
I wanted to use it, but I removed it then.
I think we use this pattern in more places. I wanted to be consistent.
We’re not longer using the count here so this can be removed.