Answer by jjanes for Why does pre-sorted index not help me in window function?
You haven't shown that it doesn't spot the index, only that it doesn't use it. If you set enable_sort = off; then what happens?If the table is not well vacuumed and the correlation of team_id with the...
View ArticleWhy does pre-sorted index not help me in window function?
I am trying to speed up this query. Currently it takes ~6s.It queries a TEMP TABLE providers_tam_with_offices_tmp.select *, %(max_providers_to_target_per_territory)s as max_providers, case when...
View Article
More Pages to Explore .....