Possible that we can create a field on the node that stores the total number of events for that node. That way a count will not need to be performed.
Note: that the COUNT(*) call is not always that slow. It only seems to occur on nodes that have node been loaded in a while. Making me think it has to do with postgres caching something to disk, and the time to load that data is what is slowing the query.
Possible that we can create a field on the node that stores the total number of events for that node. That way a count will not need to be performed.
Note: that the COUNT(*) call is not always that slow. It only seems to occur on nodes that have node been loaded in a while. Making me think it has to do with postgres caching something to disk, and the time to load that data is what is slowing the query.