explain.depesz.com

PostgreSQL's explain analyze made readable

Result: T4HC

Settings
# exclusive inclusive rows x rows loops node
1. 0.151 5,184.417 ↓ 2.3 261 1

Append (cost=1.98..1,117,137.38 rows=112 width=299) (actual time=20.112..5,184.417 rows=261 loops=1)

2. 1.083 3,793.671 ↓ 2.0 190 1

Nested Loop (cost=1.98..927,445.60 rows=93 width=294) (actual time=20.111..3,793.671 rows=190 loops=1)

3. 0.593 9.498 ↓ 2.0 190 1

Nested Loop (cost=1.70..2,524.32 rows=93 width=161) (actual time=1.083..9.498 rows=190 loops=1)

4. 0.319 5.295 ↓ 2.0 190 1

Nested Loop (cost=1.27..1,742.94 rows=93 width=125) (actual time=1.038..5.295 rows=190 loops=1)

5. 0.195 4.406 ↓ 2.0 190 1

Nested Loop (cost=0.99..1,191.04 rows=93 width=96) (actual time=1.032..4.406 rows=190 loops=1)

6. 0.547 3.451 ↓ 2.0 190 1

Nested Loop (cost=0.71..639.14 rows=93 width=67) (actual time=1.025..3.451 rows=190 loops=1)

7. 1.574 1.574 ↓ 2.0 190 1

Index Scan using ix_billinglog_exportid on billinglog (cost=0.42..18.77 rows=93 width=36) (actual time=1.016..1.574 rows=190 loops=1)

  • Index Cond: (exportid = '2678'::bigint)
  • Filter: (entitytypeid = 1)
  • Rows Removed by Filter: 71
8. 1.330 1.330 ↑ 1.0 1 190

Index Scan using pk_user on "user" (cost=0.29..6.67 rows=1 width=35) (actual time=0.007..0.007 rows=1 loops=190)

  • Index Cond: (id = billinglog.userid)
9. 0.760 0.760 ↑ 1.0 1 190

Index Scan using pk_organisation on organisation userorg (cost=0.28..5.93 rows=1 width=33) (actual time=0.004..0.004 rows=1 loops=190)

  • Index Cond: (id = billinglog.userorgid)
10. 0.570 0.570 ↑ 1.0 1 190

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

  • Index Cond: (id = billinglog.topparentorgid)
11. 3.610 3.610 ↑ 1.0 1 190

Index Scan using pk_request on roadworkrequest (cost=0.43..8.40 rows=1 width=40) (actual time=0.019..0.019 rows=1 loops=190)

  • Index Cond: (id = billinglog.entityid)
12. 0.950 0.950 ↑ 1.0 1 190

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

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

SubPlan (for Nested Loop)

14. 0.760 3,782.140 ↑ 1.0 1 190

Limit (cost=0.00..9,945.09 rows=1 width=8) (actual time=19.906..19.906 rows=1 loops=190)

15. 3,781.380 3,781.380 ↑ 1.0 1 190

Seq Scan on billinglog bl (cost=0.00..9,945.09 rows=1 width=8) (actual time=19.902..19.902 rows=1 loops=190)

  • Filter: (entityid = billinglog.entityid)
  • Rows Removed by Filter: 302,532
16. 0.305 1,390.595 ↓ 3.7 71 1

Nested Loop (cost=1.98..189,690.10 rows=19 width=324) (actual time=17.726..1,390.595 rows=71 loops=1)

17. 0.066 2.950 ↓ 3.7 71 1

Nested Loop (cost=1.69..727.43 rows=19 width=159) (actual time=0.065..2.950 rows=71 loops=1)

18. 0.178 2.671 ↓ 3.7 71 1

Nested Loop (cost=1.41..589.85 rows=19 width=130) (actual time=0.058..2.671 rows=71 loops=1)

19. 0.179 2.280 ↓ 3.7 71 1

Nested Loop (cost=1.13..452.26 rows=19 width=101) (actual time=0.050..2.280 rows=71 loops=1)

20. 0.266 1.604 ↓ 3.7 71 1

Nested Loop (cost=0.84..305.64 rows=19 width=70) (actual time=0.039..1.604 rows=71 loops=1)

21. 0.273 0.273 ↓ 2.1 71 1

Index Scan using ix_billinglog_exportid on billinglog billinglog_1 (cost=0.42..18.77 rows=34 width=36) (actual time=0.019..0.273 rows=71 loops=1)

  • Index Cond: (exportid = '2678'::bigint)
  • Filter: (entitytypeid = 2)
  • Rows Removed by Filter: 190
22. 1.065 1.065 ↑ 1.0 1 71

Index Scan using pk_permit on permit (cost=0.42..8.44 rows=1 width=38) (actual time=0.015..0.015 rows=1 loops=71)

  • Index Cond: (id = billinglog_1.entityid)
23. 0.497 0.497 ↑ 1.0 1 71

Index Scan using pk_user on "user" user_1 (cost=0.29..7.72 rows=1 width=35) (actual time=0.007..0.007 rows=1 loops=71)

  • Index Cond: (id = billinglog_1.userid)
24. 0.213 0.213 ↑ 1.0 1 71

Index Scan using pk_organisation on organisation userorg_1 (cost=0.28..7.24 rows=1 width=33) (actual time=0.003..0.003 rows=1 loops=71)

  • Index Cond: (id = billinglog_1.userorgid)
25. 0.213 0.213 ↑ 1.0 1 71

Index Scan using pk_organisation on organisation topparentorg_1 (cost=0.28..7.24 rows=1 width=33) (actual time=0.003..0.003 rows=1 loops=71)

  • Index Cond: (id = billinglog_1.topparentorgid)
26. 0.284 0.284 ↑ 1.0 1 71

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=71)

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

SubPlan (for Nested Loop)

28. 0.355 1,387.056 ↑ 1.0 1 71

Limit (cost=0.00..9,945.09 rows=1 width=8) (actual time=19.536..19.536 rows=1 loops=71)

29. 1,386.701 1,386.701 ↑ 1.0 1 71

Seq Scan on billinglog bl_1 (cost=0.00..9,945.09 rows=1 width=8) (actual time=19.531..19.531 rows=1 loops=71)

  • Filter: (entityid = billinglog_1.entityid)
  • Rows Removed by Filter: 297,271