We have two environment staging and production. For Database service we are using AWS RDS(postgresql).
SELECT *
FROM addressfabric_v2_2022_7
WHERE ST_Intersects(ST_GeomFromText('POLYGON((-75.7891846 45.2530176,-75.2783203 45.2568822,-74.9981689 45.3688422,-75.0750732 45.5613573,-75.7397461 45.6113035,-75.7891846 45.2530176))',4326),geometry)
limit 20 offset 180
We are getting different response for above query on staging and production. Data and RDS configuration on both environments are exactly same.
Query Plan:Staging
Query Plan:Production
Same query is behaving differently on staging and production environment.
I have also checked the value of "max_parallel_workers_per_gather". On both environment it is 4.


explain (analyze, buffers, format text)Screen shots of some graphical representation simply hide way too many details. – Aug 29 '22 at 12:35