https://pastebin.canonical.com/13489/ shows the output of EXPLAIN ANALYZE using roughly the same query on staging. The query takes only 0.4s -- much less than the 25s we are seeing on production.
https://pastebin.canonical.com/13490/ shows the same EXPLAIN call on production: less than 0.2s.
If I had to guess, I'd say we are being bitten by some sort of lock. I'd rather not guess though, and ask stub instead.
https:/ /pastebin. canonical. com/13489/ shows the output of EXPLAIN ANALYZE using roughly the same query on staging. The query takes only 0.4s -- much less than the 25s we are seeing on production.
https:/ /pastebin. canonical. com/13490/ shows the same EXPLAIN call on production: less than 0.2s.
If I had to guess, I'd say we are being bitten by some sort of lock. I'd rather not guess though, and ask stub instead.