explain.depesz.com

PostgreSQL's explain analyze made readable

Result: QwOP

Settings
# exclusive inclusive rows x rows loops node
1. 0.025 77.663 ↑ 1.0 20 1

Limit (cost=2.83..225.37 rows=20 width=2,257) (actual time=5.458..77.663 rows=20 loops=1)

2. 0.079 77.638 ↑ 18,980.4 20 1

Merge Join (cost=2.83..4,223,918.53 rows=379,608 width=2,257) (actual time=5.457..77.638 rows=20 loops=1)

  • Merge Cond: (package0_.fk_current_business_partner = businesspa6_.id_business_partner)
3. 0.090 77.538 ↑ 18,980.4 20 1

Nested Loop (cost=2.56..4,218,607.11 rows=379,608 width=2,109) (actual time=5.429..77.538 rows=20 loops=1)

  • Join Filter: (subrequest3_.fk_service_code = servicecod4_.id_service_code)
  • Rows Removed by Join Filter: 80
4. 0.132 77.408 ↑ 18,980.4 20 1

Nested Loop (cost=2.56..4,013,317.80 rows=379,608 width=2,030) (actual time=5.406..77.408 rows=20 loops=1)

5. 0.092 53.216 ↑ 18,980.4 20 1

Nested Loop (cost=2.00..3,121,924.91 rows=379,608 width=1,778) (actual time=3.988..53.216 rows=20 loops=1)

6. 0.088 32.064 ↑ 18,980.4 20 1

Nested Loop (cost=1.56..2,287,455.18 rows=379,608 width=1,663) (actual time=2.362..32.064 rows=20 loops=1)

7. 0.093 7.776 ↑ 18,980.4 20 1

Nested Loop Left Join (cost=1.13..1,449,510.94 rows=379,608 width=1,526) (actual time=0.780..7.776 rows=20 loops=1)

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

Index Scan using packages_curr_bp_status_idx on packages package0_ (cost=0.56..514,135.94 rows=379,635 width=1,163) (actual time=0.755..7.663 rows=20 loops=1)

  • Index Cond: (status = 9)
9. 0.020 0.020 ↓ 0.0 0 20

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

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

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

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

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

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

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

  • Index Cond: (id_sub_request = package0_.fk_current_sub_request)
13. 0.031 0.040 ↑ 7.4 5 20

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

14. 0.009 0.009 ↑ 7.4 5 1

Seq Scan on service_codes servicecod4_ (cost=0.00..1.37 rows=37 width=79) (actual time=0.008..0.009 rows=5 loops=1)

15. 0.021 0.021 ↑ 757.0 1 1

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