explain.depesz.com

PostgreSQL's explain analyze made readable

Result: Gxvt

Settings
# exclusive inclusive rows x rows loops node
1. 0.006 276.693 ↑ 6.9 7 1

Append (cost=1.98..291,449.94 rows=48 width=299) (actual time=90.322..276.693 rows=7 loops=1)

2. 0.065 206.066 ↑ 7.8 5 1

Nested Loop (cost=1.98..236,737.13 rows=39 width=294) (actual time=90.321..206.066 rows=5 loops=1)

3. 0.019 108.491 ↑ 7.8 5 1

Nested Loop (cost=1.70..1,126.88 rows=39 width=161) (actual time=66.600..108.491 rows=5 loops=1)

4. 0.010 48.217 ↑ 7.8 5 1

Nested Loop (cost=1.27..797.52 rows=39 width=126) (actual time=48.139..48.217 rows=5 loops=1)

5. 0.009 46.642 ↑ 7.8 5 1

Nested Loop (cost=0.99..557.82 rows=39 width=97) (actual time=46.577..46.642 rows=5 loops=1)

6. 0.011 35.313 ↑ 7.8 5 1

Nested Loop (cost=0.71..318.12 rows=39 width=68) (actual time=35.266..35.313 rows=5 loops=1)

7. 0.092 0.092 ↑ 7.8 5 1

Index Scan using ix_billinglog_exportid on billinglog (cost=0.42..26.22 rows=39 width=36) (actual time=0.077..0.092 rows=5 loops=1)

  • Index Cond: (exportid = '2146'::bigint)
  • Filter: (CASE WHEN (exportid IS NOT NULL) THEN true ELSE false END AND (entitytypeid = 1))
  • Rows Removed by Filter: 2
8. 35.210 35.210 ↑ 1.0 1 5

Index Scan using pk_user on "user" (cost=0.29..7.48 rows=1 width=36) (actual time=7.042..7.042 rows=1 loops=5)

  • Index Cond: (id = billinglog.userid)
9. 11.320 11.320 ↑ 1.0 1 5

Index Scan using pk_organisation on organisation userorg (cost=0.28..6.15 rows=1 width=33) (actual time=2.264..2.264 rows=1 loops=5)

  • Index Cond: (id = billinglog.userorgid)
10. 1.565 1.565 ↑ 1.0 1 5

Index Scan using pk_organisation on organisation topparentorg (cost=0.28..6.15 rows=1 width=33) (actual time=0.313..0.313 rows=1 loops=5)

  • Index Cond: (id = billinglog.topparentorgid)
11. 60.255 60.255 ↑ 1.0 1 5

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

  • Index Cond: (id = billinglog.entityid)
12. 20.830 20.830 ↑ 1.0 1 5

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

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

SubPlan (forNested Loop)

14. 0.050 76.680 ↑ 1.0 1 5

Limit (cost=0.00..6,040.99 rows=1 width=8) (actual time=15.336..15.336 rows=1 loops=5)

15. 76.630 76.630 ↑ 1.0 1 5

Seq Scan on billinglog bl (cost=0.00..6,040.99 rows=1 width=8) (actual time=15.326..15.326 rows=1 loops=5)

  • Filter: (entityid = billinglog.entityid)
  • Rows Removed by Filter: 216833
16. 0.015 70.621 ↑ 4.5 2 1

Nested Loop (cost=1.98..54,712.33 rows=9 width=324) (actual time=46.184..70.621 rows=2 loops=1)

17. 0.001 41.064 ↑ 4.5 2 1

Nested Loop (cost=1.69..340.68 rows=9 width=159) (actual time=31.437..41.064 rows=2 loops=1)

18. 0.008 41.053 ↑ 4.5 2 1

Nested Loop (cost=1.41..274.28 rows=9 width=130) (actual time=31.429..41.053 rows=2 loops=1)

19. 0.011 41.023 ↑ 4.5 2 1

Nested Loop (cost=1.13..207.89 rows=9 width=101) (actual time=31.405..41.023 rows=2 loops=1)

20. 0.008 33.528 ↑ 4.5 2 1

Nested Loop (cost=0.84..135.91 rows=9 width=69) (actual time=23.923..33.528 rows=2 loops=1)

21. 0.024 0.024 ↑ 6.5 2 1

Index Scan using ix_billinglog_exportid on billinglog billinglog_1 (cost=0.42..26.22 rows=13 width=36) (actual time=0.016..0.024 rows=2 loops=1)

  • Index Cond: (exportid = '2146'::bigint)
  • Filter: (CASE WHEN (exportid IS NOT NULL) THEN true ELSE false END AND (entitytypeid = 2))
  • Rows Removed by Filter: 5
22. 33.496 33.496 ↑ 1.0 1 2

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

  • Index Cond: (id = billinglog_1.entityid)
23. 7.484 7.484 ↑ 1.0 1 2

Index Scan using pk_user on "user" user_1 (cost=0.29..8.00 rows=1 width=36) (actual time=3.742..3.742 rows=1 loops=2)

  • Index Cond: (id = billinglog_1.userid)
24. 0.022 0.022 ↑ 1.0 1 2

Index Scan using pk_organisation on organisation userorg_1 (cost=0.28..7.38 rows=1 width=33) (actual time=0.011..0.011 rows=1 loops=2)

  • Index Cond: (id = billinglog_1.userorgid)
25. 0.010 0.010 ↑ 1.0 1 2

Index Scan using pk_organisation on organisation topparentorg_1 (cost=0.28..7.38 rows=1 width=33) (actual time=0.005..0.005 rows=1 loops=2)

  • Index Cond: (id = billinglog_1.topparentorgid)
26. 0.010 0.010 ↑ 1.0 1 2

Index Scan using pk_organisation on organisation permitpsmorg (cost=0.28..0.31 rows=1 width=34) (actual time=0.005..0.005 rows=1 loops=2)

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

SubPlan (forNested Loop)

28. 0.014 29.532 ↑ 1.0 1 2

Limit (cost=0.00..6,040.99 rows=1 width=8) (actual time=14.766..14.766 rows=1 loops=2)

29. 29.518 29.518 ↑ 1.0 1 2

Seq Scan on billinglog bl_1 (cost=0.00..6,040.99 rows=1 width=8) (actual time=14.759..14.759 rows=1 loops=2)

  • Filter: (entityid = billinglog_1.entityid)
  • Rows Removed by Filter: 207404
Planning time : 2.926 ms