explain.depesz.com

PostgreSQL's explain analyze made readable

Result: sf3Z

Settings
# exclusive inclusive rows x rows loops node
1. 0.160 5,336.284 ↓ 2.3 261 1

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

2. 1.105 3,922.960 ↓ 2.0 190 1

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

3. 0.592 6.145 ↓ 2.0 190 1

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

4. 0.390 4.603 ↓ 2.0 190 1

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

5. 0.286 3.643 ↓ 2.0 190 1

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

6. 0.529 2.407 ↓ 2.0 190 1

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

7. 0.548 0.548 ↓ 2.0 190 1

Index Scan using ix_billinglog_exportid on billinglog (cost=0.42..18.77 rows=93 width=36) (actual time=0.032..0.548 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.950 0.950 ↑ 1.0 1 190

Index Scan using pk_organisation on organisation userorg (cost=0.28..5.93 rows=1 width=33) (actual time=0.005..0.005 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. 0.950 0.950 ↑ 1.0 1 190

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

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

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

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

SubPlan (for Nested Loop)

14. 0.950 3,914.950 ↑ 1.0 1 190

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

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

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

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

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

17. 0.084 2.266 ↓ 3.7 71 1

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

18. 0.170 1.969 ↓ 3.7 71 1

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

19. 0.167 1.515 ↓ 3.7 71 1

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

20. 0.221 1.064 ↓ 3.7 71 1

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

21. 0.275 0.275 ↓ 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.018..0.275 rows=71 loops=1)

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

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

  • Index Cond: (id = billinglog_1.entityid)
23. 0.284 0.284 ↑ 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.004..0.004 rows=1 loops=71)

  • Index Cond: (id = billinglog_1.userid)
24. 0.284 0.284 ↑ 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.004..0.004 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,410.273 ↑ 1.0 1 71

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

29. 1,409.918 1,409.918 ↑ 1.0 1 71

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

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