query-plan-1163

Change label
Query Plan as raw text
Summary
Time Node
Node (ms) Percent
409925.552 100.00%
 Limit (cost=335.76..335.77 rows=6 width=184) (actual time=409925.515..409925.552 rows=7 loops=1)
409925.517 100.00%
   -> Sort (cost=335.76..335.77 rows=6 width=184) (actual time=409925.503..409925.517 rows=7 loops=1)
         Sort Key: application.application_id
409925.212 100.00%
         -> Merge Left Join (cost=334.87..335.68 rows=6 width=184) (actual time=106497.295..409925.212 rows=7 loops=1)
               Merge Cond: ("outer".referrer_id = "inner".id)
139.512 0.03%
               -> Sort (cost=320.04..320.05 rows=6 width=188) (actual time=139.484..139.512 rows=7 loops=1)
                     Sort Key: application.referrer_id
139.303 0.03%
                     -> Nested Loop Left Join (cost=1.2..319.96 rows=6 width=188) (actual time=98.697..139.303 rows=7 loops=1)
139.206 0.03%
                           -> Nested Loop Left Join (cost=1.2..284.89 rows=6 width=192) (actual time=98.675..139.206 rows=7 loops=1)
116.631 0.03%
                                 -> Nested Loop Left Join (cost=1.2..249.82 rows=6 width=196) (actual time=76.303..116.631 rows=7 loops=1)
116.550 0.03%
                                       -> Nested Loop Left Join (cost=1.2..231.67 rows=6 width=204) (actual time=76.287..116.550 rows=7 loops=1)
116.457 0.03%
                                             -> Nested Loop Left Join (cost=1.2..199.09 rows=6 width=208) (actual time=76.265..116.457 rows=7 loops=1)
                                                   Join Filter: ("outer".product_type_id = "inner".product_type_id)
110.996 0.03%
                                                   -> Nested Loop Left Join (cost=0.0..195.46 rows=6 width=212) (actual time=71.453..110.996 rows=7 loops=1)
110.762 0.03%
                                                         -> Nested Loop Left Join (cost=0.0..136.66 rows=6 width=160) (actual time=71.389..110.762 rows=7 loops=1)
95.402 0.02%
                                                               -> Nested Loop Left Join (cost=0.0..101.25 rows=6 width=148) (actual time=56.283..95.402 rows=7 loops=1)
85.387 0.02%
                                                                     -> Nested Loop Left Join (cost=0.0..65.85 rows=6 width=148) (actual time=56.257..85.387 rows=7 loops=1)
57.936 0.01%
                                                                           -> Index Scan using application__organization_id_index on application (cost=0.0..33.28 rows=6 width=152) (actual time=29.117..57.936 rows=7 loops=1)
                                                                                 Index Cond: (organization_id = 4638)
                                                                                 Filter: ((application_type <> 10) AND (status <> 90) AND (status <> 160) AND (application_source = 1) AND (status <> 0))
27.223 0.01%
                                                                           -> Index Scan using retailer__organization_id_index on retailer organization (cost=0.0..5.42 rows=1 width=4) (actual time=3.885..3.889 rows=1 loops=7)
                                                                                 Index Cond: (organization_id = 4638)
9.919 0.00%
                                                                     -> Index Scan using system_user__user_id_index on system_user inspector (cost=0.0..5.89 rows=1 width=12) (actual time=1.415..1.417 rows=0 loops=7)
                                                                           Index Cond: ("outer".inspector_user_id = inspector.user_id)
15.246 0.00%
                                                               -> Index Scan using system_user__user_id_index on system_user creator (cost=0.0..5.89 rows=1 width=24) (actual time=2.174..2.178 rows=1 loops=7)
                                                                     Index Cond: ("outer".creator_user_id = creator.user_id)
0.154 0.00%
                                                         -> Index Scan using application__parent_application_id_index on application guarantor_app (cost=0.0..9.77 rows=2 width=60) (actual time=0.022..0.022 rows=0 loops=7)
                                                               Index Cond: ("outer".application_id = guarantor_app.parent_application_id)
5.075 0.00%
                                                   -> Materialize (cost=1.2..1.38 rows=18 width=4) (actual time=0.671..0.725 rows=18 loops=7)
4.739 0.00%
                                                         -> Seq Scan on product_type (cost=0.0..1.18 rows=18 width=4) (actual time=4.664..4.739 rows=18 loops=1)
0.021 0.00%
                                             -> Index Scan using retailer__organization_id_index on retailer vendor (cost=0.0..5.42 rows=1 width=4) (actual time=0.003..0.003 rows=0 loops=7)
                                                   Index Cond: (vendor.organization_id = "outer".vendor)
0.014 0.00%
                                       -> Index Scan using application_campaign_id_key on application_campaign (cost=0.0..3.01 rows=1 width=8) (actual time=0.002..0.002 rows=0 loops=7)
                                             Index Cond: (application_campaign.id = "outer".campaign_id)
22.491 0.01%
                                 -> Index Scan using shop__shop_id_index on shop s (cost=0.0..5.83 rows=1 width=4) (actual time=3.207..3.213 rows=1 loops=7)
                                       Index Cond: (s.shop_id = "outer".shop_id)
0.014 0.00%
                           -> Index Scan using shop__shop_id_index on shop vs (cost=0.0..5.83 rows=1 width=4) (actual time=0.002..0.002 rows=0 loops=7)
                                 Index Cond: (vs.shop_id = "outer".vendor_shop)
0.000 0.00%
               -> Sort (never executed)
                     Sort Key: r.id
0.000 0.00%
                     -> Seq Scan on referrer_legal r (never executed)
Run-time
6 minutes 49.942549 seconds (409942.549 ms)