explain.depesz.com

PostgreSQL's explain analyze made readable

Result: snQ3

Settings
# exclusive inclusive rows x rows loops node
1. 0.011 91,627.825 ↑ 1.0 20 1

Limit (cost=2.83..1,257.29 rows=20 width=2,273) (actual time=88,419.390..91,627.825 rows=20 loops=1)

2. 0.060 91,627.814 ↑ 5,896.1 20 1

Nested Loop (cost=2.83..7,396,489.69 rows=117,923 width=2,273) (actual time=88,419.388..91,627.814 rows=20 loops=1)

3. 0.078 91,626.234 ↑ 5,896.1 20 1

Nested Loop (cost=2.56..7,162,915.48 rows=117,923 width=2,109) (actual time=88,418.397..91,626.234 rows=20 loops=1)

  • Join Filter: (subrequest3_.fk_service_code = servicecod4_.id_service_code)
  • Rows Removed by Join Filter: 275
4. 0.067 91,626.096 ↑ 5,896.1 20 1

Nested Loop (cost=2.56..7,099,142.44 rows=117,923 width=2,030) (actual time=88,418.360..91,626.096 rows=20 loops=1)

5. 0.053 91,603.929 ↑ 5,896.1 20 1

Nested Loop (cost=2.00..6,818,117.52 rows=117,923 width=1,778) (actual time=88,416.365..91,603.929 rows=20 loops=1)

6. 0.048 91,584.816 ↑ 5,896.1 20 1

Nested Loop (cost=1.56..6,558,893.45 rows=117,923 width=1,663) (actual time=88,415.397..91,584.816 rows=20 loops=1)

7. 32.106 91,569.308 ↑ 5,896.1 20 1

Nested Loop Left Join (cost=1.13..6,297,027.44 rows=117,923 width=1,526) (actual time=88,414.348..91,569.308 rows=20 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: 36500
8. 88,433.002 88,433.002 ↑ 3.2 36,520 1

Index Scan using packages_received_at_desc_id_desc_idx on packages package0_ (cost=0.56..6,000,407.84 rows=117,931 width=1,163) (actual time=2.338..88,433.002 rows=36,520 loops=1)

  • Filter: (status = 1)
  • Rows Removed by Filter: 160808
9. 3,104.200 3,104.200 ↑ 1.0 1 36,520

Index Scan using subrequest_tasks_pkey on subrequest_tasks subrequest5_ (cost=0.57..2.50 rows=1 width=363) (actual time=0.085..0.085 rows=1 loops=36,520)

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

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

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

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

  • Index Cond: (id = request1_.fk_order)
12. 22.100 22.100 ↑ 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=1.105..1.105 rows=1 loops=20)

  • Index Cond: (id_sub_request = package0_.fk_current_sub_request)
13. 0.049 0.060 ↑ 2.5 15 20

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

14. 0.011 0.011 ↑ 1.9 20 1

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

15. 1.520 1.520 ↑ 1.0 1 20

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

  • Index Cond: (id_business_partner = package0_.fk_current_business_partner)