explain.depesz.com

PostgreSQL's explain analyze made readable

Result: JJ8S

Settings
# exclusive inclusive rows x rows loops node
1. 0.945 38,289.016 ↓ 34.9 1,747 1

Append (cost=1,001.56..368,129.11 rows=50 width=299) (actual time=46.575..38,289.016 rows=1,747 loops=1)

2. 0.000 30,603.599 ↓ 34.0 1,395 1

Gather (cost=1,001.56..297,426.69 rows=41 width=294) (actual time=46.574..30,603.599 rows=1,395 loops=1)

  • Workers Planned: 1
  • Workers Launched: 1
3. 5.568 77.634 ↓ 29.1 698 2

Nested Loop (cost=1.56..6,588.47 rows=24 width=191) (actual time=28.658..77.634 rows=698 loops=2)

4. 10.690 72.060 ↓ 29.1 698 2

Nested Loop (cost=1.28..6,581.19 rows=24 width=161) (actual time=28.634..72.060 rows=698 loops=2)

5. 3.507 61.357 ↓ 29.1 698 2

Nested Loop (cost=0.85..6,378.51 rows=24 width=126) (actual time=28.594..61.357 rows=698 loops=2)

6. 4.749 57.847 ↓ 29.1 698 2

Nested Loop (cost=0.57..6,221.45 rows=24 width=97) (actual time=28.575..57.847 rows=698 loops=2)

7. 9.621 53.093 ↓ 29.1 698 2

Nested Loop (cost=0.29..6,064.39 rows=24 width=68) (actual time=28.544..53.093 rows=698 loops=2)

8. 43.462 43.462 ↓ 29.1 698 2

Parallel Seq Scan on billinglog (cost=0.00..5,886.15 rows=24 width=36) (actual time=28.498..43.462 rows=698 loops=2)

  • Filter: (CASE WHEN (exportid IS NOT NULL) THEN true ELSE false END AND (entitytypeid = 1) AND (exportid = '2680'::bigint))
  • Rows Removed by Filter: 156516
9. 0.010 0.010 ↑ 1.0 1 1,395

Index Scan using pk_user on "user" (cost=0.29..7.43 rows=1 width=36) (actual time=0.010..0.010 rows=1 loops=1,395)

  • Index Cond: (id = billinglog.userid)
10. 0.005 0.005 ↑ 1.0 1 1,395

Index Scan using pk_organisation on organisation userorg (cost=0.28..6.54 rows=1 width=33) (actual time=0.005..0.005 rows=1 loops=1,395)

  • Index Cond: (id = billinglog.userorgid)
11. 0.003 0.003 ↑ 1.0 1 1,395

Index Scan using pk_organisation on organisation topparentorg (cost=0.28..6.54 rows=1 width=33) (actual time=0.003..0.003 rows=1 loops=1,395)

  • Index Cond: (id = billinglog.topparentorgid)
12. 0.013 0.013 ↑ 1.0 1 1,395

Index Scan using pk_request on roadworkrequest (cost=0.43..8.45 rows=1 width=39) (actual time=0.013..0.013 rows=1 loops=1,395)

  • Index Cond: (id = billinglog.entityid)
13. 0.006 0.006 ↑ 1.0 1 1,395

Index Scan using pk_organisation on organisation roadworkpsmorg (cost=0.28..0.30 rows=1 width=34) (actual time=0.006..0.006 rows=1 loops=1,395)

  • Index Cond: (id = roadworkrequest.roadworkrequestpsmorganisationid)
14.          

SubPlan (for Gather)

15. 6.975 30,550.500 ↑ 1.0 1 1,395

Limit (cost=0.00..7,069.12 rows=1 width=8) (actual time=21.900..21.900 rows=1 loops=1,395)

16. 30,543.525 30,543.525 ↑ 1.0 1 1,395

Seq Scan on billinglog bl (cost=0.00..7,069.12 rows=1 width=8) (actual time=21.895..21.895 rows=1 loops=1,395)

  • Filter: (entityid = billinglog.entityid)
  • Rows Removed by Filter: 304045
17. 0.000 7,684.472 ↓ 39.1 352 1

Gather (cost=1,001.55..70,701.92 rows=9 width=324) (actual time=33.882..7,684.472 rows=352 loops=1)

  • Workers Planned: 1
  • Workers Launched: 1
18. 0.822 19.113 ↓ 35.2 176 2

Nested Loop (cost=1.55..6,078.90 rows=5 width=189) (actual time=12.106..19.113 rows=176 loops=2)

19. 0.422 18.287 ↓ 35.2 176 2

Nested Loop (cost=1.27..6,077.28 rows=5 width=159) (actual time=12.083..18.287 rows=176 loops=2)

20. 0.511 17.863 ↓ 35.2 176 2

Nested Loop (cost=0.99..6,039.78 rows=5 width=130) (actual time=12.066..17.863 rows=176 loops=2)

21. 0.695 17.350 ↓ 35.2 176 2

Nested Loop (cost=0.71..6,002.28 rows=5 width=101) (actual time=12.036..17.350 rows=176 loops=2)

22. 1.884 16.652 ↓ 35.2 176 2

Nested Loop (cost=0.42..5,962.08 rows=5 width=69) (actual time=12.006..16.652 rows=176 loops=2)

23. 14.758 14.758 ↓ 19.6 176 2

Parallel Seq Scan on billinglog billinglog_1 (cost=0.00..5,886.15 rows=9 width=36) (actual time=11.948..14.758 rows=176 loops=2)

  • Filter: (CASE WHEN (exportid IS NOT NULL) THEN true ELSE false END AND (entitytypeid = 2) AND (exportid = '2680'::bigint))
  • Rows Removed by Filter: 157038
24. 0.010 0.010 ↑ 1.0 1 352

Index Scan using pk_permit on permit (cost=0.42..8.44 rows=1 width=37) (actual time=0.010..0.010 rows=1 loops=352)

  • Index Cond: (id = billinglog_1.entityid)
25. 0.003 0.003 ↑ 1.0 1 352

Index Scan using pk_user on "user" user_1 (cost=0.29..8.04 rows=1 width=36) (actual time=0.003..0.003 rows=1 loops=352)

  • Index Cond: (id = billinglog_1.userid)
26. 0.002 0.002 ↑ 1.0 1 352

Index Scan using pk_organisation on organisation userorg_1 (cost=0.28..7.50 rows=1 width=33) (actual time=0.002..0.002 rows=1 loops=352)

  • Index Cond: (id = billinglog_1.userorgid)
27. 0.002 0.002 ↑ 1.0 1 352

Index Scan using pk_organisation on organisation topparentorg_1 (cost=0.28..7.50 rows=1 width=33) (actual time=0.002..0.002 rows=1 loops=352)

  • Index Cond: (id = billinglog_1.topparentorgid)
28. 0.004 0.004 ↑ 1.0 1 352

Index Scan using pk_organisation on organisation permitpsmorg (cost=0.28..0.32 rows=1 width=34) (actual time=0.004..0.004 rows=1 loops=352)

  • Index Cond: (id = permit.permitpublicspacemanagerid)
29.          

SubPlan (for Gather)

30. 1.760 7,666.208 ↑ 1.0 1 352

Limit (cost=0.00..7,069.12 rows=1 width=8) (actual time=21.779..21.779 rows=1 loops=352)

31. 7,664.448 7,664.448 ↑ 1.0 1 352

Seq Scan on billinglog bl_1 (cost=0.00..7,069.12 rows=1 width=8) (actual time=21.774..21.774 rows=1 loops=352)

  • Filter: (entityid = billinglog_1.entityid)
  • Rows Removed by Filter: 305067
Planning time : 3.547 ms