>>>>> "Paul" == Paul Schaap <ps@ipggroup.com> writes:
Paul> Hi Andrew,
Paul> I agree it seems implausible to me too however it is 100%
Paul> reproducible, see below track of it happening, I have changed the
Paul> names of things to protect the innocent ;-) :
Can you show the result of adding EXPLAIN ANALYZE in front of your
select queries, both in the failing and successful cases?
i.e.
$ psql -c "EXPLAIN ANALYZE SELECT COUNT(*)
FROM my_events
WHERE my_date >= '2018-08-01'
AND my_date < '2018-09-01'
AND type_id NOT IN ('A','LIST','OF','NOTS');" my_databasename
(and likewise for the other queries you showed)
--
Andrew (irc:RhodiumToad)