We have a query that for majority of requests (about 400rpm) executes in around 2ms but occasionally we have one request that will spike to 100ms+. My Googleing may be terrible but does anyone have recommendations around how to debug the cause of these spikes (confirmed it is not network as it appears in PG's slow log) when an EXPLAIN won't help?
Background: server is running 9.5 on RDS on an instance with 15GB (db.r3.large).