query-plan-1164

Change label
Query Plan as raw text
Summary
Nested Loop Left Join (cost=68067.79..195233.89 rows=1 width=213) -> Nested Loop Left Join (cost=68067.79..195228.00 rows=1 width=145) -> Nested Loop (cost=68067.79..195222.08 rows=1 width=145) -> Hash Join (cost=68067.79..195216.15 rows=1 width=149) Hash Cond: ("outer".application_id = "inner".application_id) Join Filter: ((("inner".customer_entity = 1) AND (("inner".person_id)::text = '130965-10016'::text)) OR ((("outer".guarantor_id)::text = '130965-10016'::text) AND ("outer".status_new = 60))) -> Bitmap Heap Scan on application_history_archive h (cost=3395.08..57007.50 rows=458240 width=48) Recheck Cond: ((status_new = 40) OR (status_new = 60) OR (status_new = 65) OR (status_new = 70) OR (status_new = 100) OR (status_new = 110) OR (status_new = 115)) Filter: ((status_old <> 40) AND (status_old <> 60) AND (status_old <> 65) AND (status_old <> 70) AND (status_old <> 100) AND (status_old <> 110) AND (status_old <> 115)) -> BitmapOr (cost=3395.08..3395.08 rows=595165 width=0) -> Bitmap Index Scan on application_history_archive__status_new_index (cost=0.00..283.67 rows=49619 width=0) Index Cond: (status_new = 40) -> Bitmap Index Scan on application_history_archive__status_new_index (cost=0.00..283.67 rows=49619 width=0) Index Cond: (status_new = 60) -> Bitmap Index Scan on application_history_archive__status_new_index (cost=0.00..283.67 rows=49619 width=0) Index Cond: (status_new = 65) -> Bitmap Index Scan on application_history_archive__status_new_index (cost=0.00..283.67 rows=49619 width=0) Index Cond: (status_new = 70) -> Bitmap Index Scan on application_history_archive__status_new_index (cost=0.00..1693.07 rows=297449 width=0) Index Cond: (status_new = 100) -> Bitmap Index Scan on application_history_archive__status_new_index (cost=0.00..283.67 rows=49619 width=0) Index Cond: (status_new = 110) -> Bitmap Index Scan on application_history_archive__status_new_index (cost=0.00..283.67 rows=49619 width=0) Index Cond: (status_new = 115) -> Hash (cost=54081.17..54081.17 rows=540617 width=109) -> Seq Scan on application_archive a (cost=0.00..54081.17 rows=540617 width=109) -> Index Scan using system_user__user_id_index on system_user c (cost=0.00..5.91 rows=1 width=8) Index Cond: (c.user_id = "outer".creator_user_id) -> Index Scan using system_user__user_id_index on system_user u (cost=0.00..5.91 rows=1 width=12) Index Cond: (u.user_id = "outer".user_id) -> Index Scan using shop__shop_id_index on shop s (cost=0.00..5.86 rows=1 width=76) Index Cond: (s.shop_id = "outer".shop_id)