explain.depesz.com

PostgreSQL's explain analyze made readable

Result: yKzN

Settings
# exclusive inclusive rows x rows loops node
1. 0.006 2,368.024 ↑ 1.0 24 1

Limit (cost=2.83..1,282.53 rows=24 width=2,272) (actual time=2,357.306..2,368.024 rows=24 loops=1)

2. 0.039 2,368.018 ↑ 7,291.0 24 1

Nested Loop (cost=2.83..9,330,316.28 rows=174,985 width=2,272) (actual time=2,357.305..2,368.018 rows=24 loops=1)

3. 0.047 2,367.931 ↑ 7,291.0 24 1

Nested Loop (cost=2.56..8,983,716.96 rows=174,985 width=2,108) (actual time=2,357.292..2,367.931 rows=24 loops=1)

  • Join Filter: (subrequest3_.fk_service_code = servicecod4_.id_service_code)
  • Rows Removed by Join Filter: 352
4. 0.030 2,367.812 ↑ 7,291.0 24 1

Nested Loop (cost=2.56..8,889,085.28 rows=174,985 width=2,029) (actual time=2,357.261..2,367.812 rows=24 loops=1)

5. 0.033 2,367.662 ↑ 7,291.0 24 1

Nested Loop (cost=2.00..8,474,980.42 rows=174,985 width=1,777) (actual time=2,357.243..2,367.662 rows=24 loops=1)

6. 0.032 2,365.349 ↑ 7,291.0 24 1

Nested Loop (cost=1.56..8,090,341.74 rows=174,985 width=1,662) (actual time=2,357.228..2,365.349 rows=24 loops=1)

7. 14.993 2,363.205 ↑ 7,291.0 24 1

Nested Loop Left Join (cost=1.13..7,702,878.17 rows=174,985 width=1,525) (actual time=2,357.203..2,363.205 rows=24 loops=1)

  • Filter: ((package0_.fk_current_task IS NULL) OR (subrequest5_.task_type <> 0) OR (subrequest5_.status <> ALL ('{0,1}'::integer[])))
  • Rows Removed by Filter: 34296
8. 2,142.292 2,142.292 ↑ 5.1 34,320 1

Index Scan using packages_received_at_desc_id_desc_idx on packages package0_ (cost=0.56..7,265,992.97 rows=174,997 width=1,162) (actual time=0.018..2,142.292 rows=34,320 loops=1)

  • Filter: (status = 1)
  • Rows Removed by Filter: 160804
9. 205.920 205.920 ↑ 1.0 1 34,320

Index Scan using subrequest_tasks_pkey on subrequest_tasks subrequest5_ (cost=0.57..2.48 rows=1 width=363) (actual time=0.006..0.006 rows=1 loops=34,320)

  • Index Cond: (package0_.fk_current_task = id)
10. 2.112 2.112 ↑ 1.0 1 24

Index Scan using requests_pkey on requests request1_ (cost=0.43..2.21 rows=1 width=137) (actual time=0.088..0.088 rows=1 loops=24)

  • Index Cond: (id_request = package0_.fk_request)
11. 2.280 2.280 ↑ 1.0 1 24

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

  • Index Cond: (id = request1_.fk_order)
12. 0.120 0.120 ↑ 1.0 1 24

Index Scan using sub_requests_pkey on sub_requests subrequest3_ (cost=0.56..2.37 rows=1 width=252) (actual time=0.005..0.005 rows=1 loops=24)

  • Index Cond: (id_sub_request = package0_.fk_current_sub_request)
13. 0.061 0.072 ↑ 2.3 16 24

Materialize (cost=0.00..1.56 rows=37 width=79) (actual time=0.001..0.003 rows=16 loops=24)

14. 0.011 0.011 ↑ 1.0 36 1

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

15. 0.048 0.048 ↑ 1.0 1 24

Index Scan using business_partner_pkey on business_partners businesspa6_ (cost=0.28..1.98 rows=1 width=148) (actual time=0.002..0.002 rows=1 loops=24)

  • Index Cond: (id_business_partner = package0_.fk_current_business_partner)