explain.depesz.com

PostgreSQL's explain analyze made readable

Result: KCOE

Settings
# exclusive inclusive rows x rows loops node
1. 0.015 3,341.173 ↑ 1.0 20 1

Limit (cost=2.69..562.95 rows=20 width=4,226) (actual time=2,928.529..3,341.173 rows=20 loops=1)

2. 0.056 3,341.158 ↑ 8,911.0 20 1

Nested Loop (cost=2.69..4,992,450.75 rows=178,221 width=4,226) (actual time=2,928.527..3,341.158 rows=20 loops=1)

3. 0.108 3,341.042 ↑ 8,911.0 20 1

Nested Loop (cost=2.42..4,719,047.43 rows=178,221 width=4,063) (actual time=2,928.513..3,341.042 rows=20 loops=1)

  • Join Filter: (subrequest3_.fk_service_code = servicecod4_.id_service_code)
  • Rows Removed by Join Filter: 320
4. 0.061 3,340.834 ↑ 8,911.0 20 1

Nested Loop (cost=2.42..4,625,335.66 rows=178,221 width=3,983) (actual time=2,928.484..3,340.834 rows=20 loops=1)

5. 0.045 3,319.153 ↑ 8,911.0 20 1

Nested Loop (cost=1.99..4,275,723.48 rows=178,221 width=3,719) (actual time=2,926.653..3,319.153 rows=20 loops=1)

6. 0.041 3,301.508 ↑ 8,911.0 20 1

Nested Loop (cost=1.56..3,957,551.38 rows=178,221 width=3,604) (actual time=2,925.659..3,301.508 rows=20 loops=1)

7. 8.052 3,291.307 ↑ 8,911.0 20 1

Nested Loop Left Join (cost=1.12..3,631,204.27 rows=178,221 width=3,466) (actual time=2,924.197..3,291.307 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: 7099
8. 713.296 713.296 ↑ 25.0 7,119 1

Index Scan using packages_received_at_desc_id_desc_idx on packages package0_ (cost=0.56..3,214,853.31 rows=178,256 width=3,197) (actual time=0.111..713.296 rows=7,119 loops=1)

  • Filter: (status = 1)
  • Rows Removed by Filter: 63
9. 2,569.959 2,569.959 ↑ 1.0 1 7,119

Index Scan using subrequest_tasks_pkey on subrequest_tasks subrequest5_ (cost=0.56..2.32 rows=1 width=269) (actual time=0.361..0.361 rows=1 loops=7,119)

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

Index Scan using requests_pkey on requests request1_ (cost=0.43..1.83 rows=1 width=138) (actual time=0.508..0.508 rows=1 loops=20)

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

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

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

Index Scan using sub_requests_pkey on sub_requests subrequest3_ (cost=0.43..1.96 rows=1 width=264) (actual time=1.081..1.081 rows=1 loops=20)

  • Index Cond: (id_sub_request = package0_.fk_current_sub_request)
13. 0.092 0.100 ↑ 2.1 17 20

Materialize (cost=0.00..1.54 rows=36 width=80) (actual time=0.001..0.005 rows=17 loops=20)

14. 0.008 0.008 ↑ 2.1 17 1

Seq Scan on service_codes servicecod4_ (cost=0.00..1.36 rows=36 width=80) (actual time=0.005..0.008 rows=17 loops=1)

15. 0.060 0.060 ↑ 1.0 1 20

Index Scan using business_partner_pkey on business_partners businesspa6_ (cost=0.27..1.54 rows=1 width=147) (actual time=0.003..0.003 rows=1 loops=20)

  • Index Cond: (id_business_partner = package0_.fk_current_business_partner)