explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 1SWp

Settings
# exclusive inclusive rows x rows loops node
1. 0.015 312.884 ↑ 1.0 20 1

Limit (cost=2.81..222.43 rows=20 width=2,257) (actual time=48.029..312.884 rows=20 loops=1)

2. 0.089 312.869 ↑ 5,896.3 20 1

Merge Join (cost=2.81..1,294,945.08 rows=117,926 width=2,257) (actual time=48.028..312.869 rows=20 loops=1)

  • Merge Cond: (package0_.fk_current_business_partner = businesspa6_.id_business_partner)
3. 0.139 312.756 ↑ 5,896.3 20 1

Nested Loop (cost=2.54..1,292,904.68 rows=117,926 width=2,109) (actual time=47.997..312.756 rows=20 loops=1)

  • Join Filter: (subrequest3_.fk_service_code = servicecod4_.id_service_code)
  • Rows Removed by Join Filter: 585
4. 0.130 312.537 ↑ 5,896.3 20 1

Nested Loop (cost=2.54..1,229,129.98 rows=117,926 width=2,030) (actual time=47.964..312.537 rows=20 loops=1)

5. 0.343 243.687 ↑ 5,896.3 20 1

Nested Loop (cost=1.98..948,097.33 rows=117,926 width=1,778) (actual time=46.530..243.687 rows=20 loops=1)

6. 0.121 183.704 ↑ 5,896.3 20 1

Nested Loop (cost=1.54..688,866.66 rows=117,926 width=1,663) (actual time=33.682..183.704 rows=20 loops=1)

7. 0.134 99.343 ↑ 5,896.3 20 1

Nested Loop Left Join (cost=1.11..426,994.29 rows=117,926 width=1,526) (actual time=25.519..99.343 rows=20 loops=1)

  • Filter: ((package0_.fk_current_task IS NULL) OR (subrequest5_.task_type <> 0) OR (subrequest5_.status <> ALL ('{0,1}'::integer[])))
8. 38.989 38.989 ↑ 5,896.7 20 1

Index Scan using packages_bp_status_received_at_id_idx on packages package0_ (cost=0.54..130,366.89 rows=117,934 width=1,163) (actual time=15.598..38.989 rows=20 loops=1)

9. 60.220 60.220 ↑ 1.0 1 20

Index Scan using subrequest_tasks_pkey on subrequest_tasks subrequest5_ (cost=0.57..2.50 rows=1 width=363) (actual time=3.011..3.011 rows=1 loops=20)

  • Index Cond: (package0_.fk_current_task = id)
10. 84.240 84.240 ↑ 1.0 1 20

Index Scan using requests_pkey on requests request1_ (cost=0.43..2.22 rows=1 width=137) (actual time=4.212..4.212 rows=1 loops=20)

  • Index Cond: (id_request = package0_.fk_request)
11. 59.640 59.640 ↑ 1.0 1 20

Index Scan using orders_pkey on orders order2_ (cost=0.43..2.20 rows=1 width=115) (actual time=2.982..2.982 rows=1 loops=20)

  • Index Cond: (id = request1_.fk_order)
12. 68.720 68.720 ↑ 1.0 1 20

Index Scan using sub_requests_pkey on sub_requests subrequest3_ (cost=0.56..2.38 rows=1 width=252) (actual time=3.436..3.436 rows=1 loops=20)

  • Index Cond: (id_sub_request = package0_.fk_current_sub_request)
13. 0.070 0.080 ↑ 1.2 30 20

Materialize (cost=0.00..1.56 rows=37 width=79) (actual time=0.002..0.004 rows=30 loops=20)

14. 0.010 0.010 ↑ 1.0 36 1

Seq Scan on service_codes servicecod4_ (cost=0.00..1.37 rows=37 width=79) (actual time=0.007..0.010 rows=36 loops=1)

15. 0.024 0.024 ↑ 252.3 3 1

Index Scan using business_partner_pkey on business_partners businesspa6_ (cost=0.28..565.93 rows=757 width=148) (actual time=0.020..0.024 rows=3 loops=1)