did u check if the planner just cached the plan after an analyze run. its wierd how often that happens untill u realize the statistics were just stale and needed a quick refresh.
nice point. I actually ran "ANALYZE users;" and executed the query multiple times before taking the before/after samples. Initially the timings were a bit higher and varied, but after refreshing statistics and running the query a few times, they stabilized around the numbers I used. The earlier variance may have been due to stale PostgreSQL statistics and cache warming effects.
databas
did u check if the planner just cached the plan after an analyze run. its wierd how often that happens untill u realize the statistics were just stale and needed a quick refresh.