by andruby · 4y ago · 0 comments
We learned this the hard way. We altered some integer columns to bigint. That cleared the statistics for those column and caused terrible query plans. An ANALYZE fixes this, but it took us a few days to notice.
Since then we typically include an analyze statement whenever we do a large change, or rewrite a lot of rows.