Hi Melvin, We have deployed our databases in Heroku and we have followed the upgrade option that they have provided to us. Here is the command. heroku pg:upgrade --app <app_name> I am not sure whether they are doing the vacuum after the upgrade. I have disabled the parallel execution; still execution plan is not correct. QUERY PLAN ------------------------------------------------------------------------------------------------------------------------------- Aggregate (cost=3391172.70..3391172.71 rows=1 width=8) -> Nested Loop Semi Join (cost=3218963.06..3391149.45 rows=46513 width=0) -> Nested Loop (cost=3218962.89..3343428.74 rows=46513 width=4) -> Hash Join (cost=3218962.80..3323993.25 rows=46513 width=4) Hash Cond: (os.order_status_history_id = osh.order_status_history_id) -> Seq Scan on tblpuorderstatus os (cost=0.00..96501.53 rows=11185842 width=8) -> Hash (cost=3217108.89..3217108.89 rows=529689 width=4) -> Seq Scan on tblpuorderstatushistory osh (cost=0.00..3217108.89 rows=529689 width=4) Filter: ((cancelled_date IS NULL) AND (cc_accept_date IS NOT NULL) AND (vip_order_type = 17)) -> Index Scan using tblcnpatientordermap_pkey on tblcnpatientordermap po (cost=0.09..0.41 rows=1 width=8) Index Cond: (vip_order_id = os.vip_order_id) -> Nested Loop Semi Join (cost=0.17..1.02 rows=1 width=4) -> Index Scan using tblcndoctorpatientmap_pkey on tblcndoctorpatientmap d (cost=0.09..0.39 rows=1 width=8) Index Cond: (vip_patient_id = po.vip_patient_id) -> Index Scan using tblcnaccounts_pkey on tblcnaccounts a (cost=0.08..0.36 rows=1 width=4) Index Cond: (master_user_id = d.master_user_id) Filter: ((user_name)::text = 'rdoyleda'::text) (17 rows) Thanks ravi From: Melvin Davidson [mailto:melvin6925@xxxxxxxxx]
On Tue, Jan 17, 2017 at 2:31 PM, Ravi Tammineni <rtammineni@xxxxxxxxxxxxxxxxxxxxx> wrote:
2. Have you insured that the proper changed were done to the postgresql.conf in 9.6?
Melvin Davidson |