query-plan-1158

Change label
Query Plan as raw text
Summary
Time Node
Node (ms) Percent
71450.988 100.00%
 Nested Loop Left Join (cost=68948.34..202765.72 rows=1 width=232) (actual time=71450.988..71450.988 rows=0 loops=1)
71450.975 100.00%
   -> Hash Join (cost=68948.34..202748.07 rows=1 width=164) (actual time=71450.975..71450.975 rows=0 loops=1)
         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)))
20055.807 28.07%
         -> Bitmap Heap Scan on application_history_archive h (cost=3479.8..57770.15 rows=472776 width=48) (actual time=717.045..20055.807 rows=504567 loops=1)
               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))
643.111 0.90%
               -> BitmapOr (cost=3479.8..3479.8 rows=610230 width=0) (actual time=643.111..643.111 rows=0 loops=1)
147.410 0.21%
                     -> Bitmap Index Scan on application_history_archive__status_new_index (cost=0.0..310.06 rows=54302 width=0) (actual time=147.410..147.410 rows=64844 loops=1)
                           Index Cond: (status_new = 40)
12.895 0.02%
                     -> Bitmap Index Scan on application_history_archive__status_new_index (cost=0.0..310.06 rows=54302 width=0) (actual time=12.895..12.895 rows=13510 loops=1)
                           Index Cond: (status_new = 60)
0.044 0.00%
                     -> Bitmap Index Scan on application_history_archive__status_new_index (cost=0.0..310.06 rows=54302 width=0) (actual time=0.044..0.044 rows=0 loops=1)
                           Index Cond: (status_new = 65)
118.103 0.17%
                     -> Bitmap Index Scan on application_history_archive__status_new_index (cost=0.0..310.06 rows=54302 width=0) (actual time=118.103..118.103 rows=111238 loops=1)
                           Index Cond: (status_new = 70)
333.913 0.47%
                     -> Bitmap Index Scan on application_history_archive__status_new_index (cost=0.0..1619.46 rows=284418 width=0) (actual time=333.913..333.913 rows=289070 loops=1)
                           Index Cond: (status_new = 100)
30.654 0.04%
                     -> Bitmap Index Scan on application_history_archive__status_new_index (cost=0.0..310.06 rows=54302 width=0) (actual time=30.654..30.654 rows=27606 loops=1)
                           Index Cond: (status_new = 110)
0.046 0.00%
                     -> Bitmap Index Scan on application_history_archive__status_new_index (cost=0.0..310.06 rows=54302 width=0) (actual time=0.046..0.046 rows=0 loops=1)
                           Index Cond: (status_new = 115)
33151.456 46.40%
         -> Hash (cost=54082.63..54082.63 rows=540763 width=124) (actual time=33151.456..33151.456 rows=540763 loops=1)
27794.045 38.90%
               -> Seq Scan on application_archive a (cost=0.0..54082.63 rows=540763 width=124) (actual time=7.185..27794.045 rows=540763 loops=1)
0.000 0.00%
   -> Index Scan using shop__shop_id_index on shop s (never executed)
         Index Cond: (s.shop_id = "outer".shop_id)
   SubPlan
0.000 0.00%
     -> Index Scan using system_user__user_id_index on system_user c (never executed)
           Index Cond: (user_id = $1)
0.000 0.00%
     -> Index Scan using system_user__user_id_index on system_user u (never executed)
           Index Cond: (user_id = $0)
Run-time
1 minute 11.452620 seconds (71452.620 ms)