I have a DB view which basically consists of two SELECT queries with UNION ALL, like this:
SELECT
UNION ALL
CREATE VIEW v AS SELECT time, etc. FROM t1 /
I do not know Postgres, but some RMDBs handle comparison operators worse than BETWEEN in case of indexes. I would make an attempt using BETWEEN.
SELECT ... FROM v WHERE time BETWEEN ... AND ...