If the queries are sensible, you can always create indexes that index on the queried expressions.
https://www.postgresql.org/docs/current/indexes-expressional...