Skip to content

Update statistics after creating functional indexes

As a takeaway from gitlab-com/gl-infra/production#2885 (closed), we found that we should make sure to run ANALYZE $table after creating any functional indexes on $table. Otherwise, statistics for the functional expression are not present yet until the next auto-analyze. This likely means the index won't be picked up as expected.