explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 2AX

Settings
# exclusive inclusive rows x rows loops node
1. 0.007 96,285.543 ↑ 1.0 24 1

Limit (cost=2.83..1,282.53 rows=24 width=2,272) (actual time=93,317.744..96,285.543 rows=24 loops=1)

2. 0.057 96,285.536 ↑ 7,289.8 24 1

Nested Loop (cost=2.83..9,328,676.24 rows=174,954 width=2,272) (actual time=93,317.743..96,285.536 rows=24 loops=1)

3. 0.063 96,284.927 ↑ 7,289.8 24 1

Nested Loop (cost=2.56..8,982,138.98 rows=174,954 width=2,108) (actual time=93,317.728..96,284.927 rows=24 loops=1)

  • Join Filter: (subrequest3_.fk_service_code = servicecod4_.id_service_code)
  • Rows Removed by Join Filter: 341
4. 0.049 96,284.792 ↑ 7,289.8 24 1

Nested Loop (cost=2.56..8,887,523.98 rows=174,954 width=2,029) (actual time=93,317.697..96,284.792 rows=24 loops=1)

5. 0.035 96,281.023 ↑ 7,289.8 24 1

Nested Loop (cost=2.00..8,473,492.10 rows=174,954 width=1,777) (actual time=93,316.210..96,281.023 rows=24 loops=1)

6. 0.030 96,271.244 ↑ 7,289.8 24 1

Nested Loop (cost=1.56..8,088,922.73 rows=174,954 width=1,662) (actual time=93,315.077..96,271.244 rows=24 loops=1)

7. 39.089 96,266.150 ↑ 7,289.8 24 1

Nested Loop Left Join (cost=1.13..7,701,528.19 rows=174,954 width=1,525) (actual time=93,313.894..96,266.150 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: 35140
8. 92,288.693 92,288.693 ↑ 5.0 35,164 1

Index Scan using packages_received_at_desc_id_desc_idx on packages package0_ (cost=0.56..7,264,719.59 rows=174,966 width=1,162) (actual time=0.023..92,288.693 rows=35,164 loops=1)

  • Filter: (status = 1)
  • Rows Removed by Filter: 160803
9. 3,938.368 3,938.368 ↑ 1.0 1 35,164

Index Scan using subrequest_tasks_pkey on subrequest_tasks subrequest5_ (cost=0.57..2.48 rows=1 width=363) (actual time=0.112..0.112 rows=1 loops=35,164)

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

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

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

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

  • Index Cond: (id = request1_.fk_order)
12. 3.720 3.720 ↑ 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.155..0.155 rows=1 loops=24)

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

Materialize (cost=0.00..1.56 rows=37 width=79) (actual time=0.001..0.003 rows=15 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.552 0.552 ↑ 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.023..0.023 rows=1 loops=24)

  • Index Cond: (id_business_partner = package0_.fk_current_business_partner)
Planning time : 7.846 ms
Execution time : 96,285.879 ms