Filtering of non human users can be simplified
Currently we use the following pattern for filtering out ghost users, support bots, etc:
WHERE ( users.ghost = 'f' OR users.ghost IS NULL )
This can instead be simplified down to the following:
WHERE ( users.ghost IS NOT TRUE )
The same applies to the support_bot
field and others.
While the above is not likely to affect performance it does make it a bit easier to create partial indexes as there are fewer clauses we'd have to include.