explain.depesz.com

PostgreSQL's explain analyze made readable

Result: OClH

Settings
# exclusive inclusive rows x rows loops node
1. 0.235 17,227.142 ↓ 4.3 497 1

Append (cost=1.98..1,277,278.90 rows=115 width=299) (actual time=42.136..17,227.142 rows=497 loops=1)

2. 1.897 9,938.866 ↓ 2.9 278 1

Nested Loop (cost=1.98..1,066,049.70 rows=96 width=294) (actual time=42.135..9,938.866 rows=278 loops=1)

3. 0.666 7.087 ↓ 2.9 278 1

Nested Loop (cost=1.70..2,363.62 rows=96 width=161) (actual time=0.054..7.087 rows=278 loops=1)

4. 0.419 5.309 ↓ 2.9 278 1

Nested Loop (cost=1.27..1,556.90 rows=96 width=125) (actual time=0.044..5.309 rows=278 loops=1)

5. 0.443 4.334 ↓ 2.9 278 1

Nested Loop (cost=0.99..1,108.09 rows=96 width=96) (actual time=0.036..4.334 rows=278 loops=1)

6. 0.734 3.057 ↓ 2.9 278 1

Nested Loop (cost=0.71..659.29 rows=96 width=67) (actual time=0.027..3.057 rows=278 loops=1)

7. 0.655 0.655 ↓ 2.9 278 1

Index Scan using ix_billinglog_exportid on billinglog (cost=0.42..18.01 rows=96 width=36) (actual time=0.017..0.655 rows=278 loops=1)

  • Index Cond: (exportid = '4354'::bigint)
  • Filter: (entitytypeid = 1)
  • Rows Removed by Filter: 219
8. 1.668 1.668 ↑ 1.0 1 278

Index Scan using pk_user on "user" (cost=0.29..6.68 rows=1 width=35) (actual time=0.006..0.006 rows=1 loops=278)

  • Index Cond: (id = billinglog.userid)
9. 0.834 0.834 ↑ 1.0 1 278

Index Scan using ix_organisation_id_emailenabled on organisation userorg (cost=0.28..4.67 rows=1 width=33) (actual time=0.003..0.003 rows=1 loops=278)

  • Index Cond: (id = billinglog.userorgid)
10. 0.556 0.556 ↑ 1.0 1 278

Index Scan using ix_organisation_id_emailenabled on organisation topparentorg (cost=0.28..4.67 rows=1 width=33) (actual time=0.002..0.002 rows=1 loops=278)

  • Index Cond: (id = billinglog.topparentorgid)
11. 1.112 1.112 ↑ 1.0 1 278

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

  • Index Cond: (id = billinglog.entityid)
12. 0.556 0.556 ↑ 1.0 1 278

Index Scan using ix_organisation_id_emailenabled on organisation roadworkpsmorg (cost=0.28..0.30 rows=1 width=34) (actual time=0.002..0.002 rows=1 loops=278)

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

SubPlan (for Nested Loop)

14. 2.780 9,929.326 ↑ 1.0 1 278

Limit (cost=0.00..11,079.76 rows=1 width=8) (actual time=35.717..35.717 rows=1 loops=278)

15. 9,926.546 9,926.546 ↑ 1.0 1 278

Seq Scan on billinglog bl (cost=0.00..11,079.76 rows=1 width=8) (actual time=35.707..35.707 rows=1 loops=278)

  • Filter: (entityid = billinglog.entityid)
  • Rows Removed by Filter: 357,717
16. 0.972 7,288.041 ↓ 11.5 219 1

Nested Loop (cost=1.98..211,227.47 rows=19 width=326) (actual time=48.823..7,288.041 rows=219 loops=1)

17. 0.146 4.443 ↓ 11.5 219 1

Nested Loop (cost=1.69..706.18 rows=19 width=161) (actual time=0.054..4.443 rows=219 loops=1)

18. 0.317 3.859 ↓ 11.5 219 1

Nested Loop (cost=1.41..583.22 rows=19 width=132) (actual time=0.042..3.859 rows=219 loops=1)

19. 0.223 3.104 ↓ 11.5 219 1

Nested Loop (cost=1.13..460.26 rows=19 width=103) (actual time=0.036..3.104 rows=219 loops=1)

20. 0.717 2.224 ↓ 11.5 219 1

Nested Loop (cost=0.84..313.33 rows=19 width=72) (actual time=0.028..2.224 rows=219 loops=1)

21. 0.412 0.412 ↓ 6.3 219 1

Index Scan using ix_billinglog_exportid on billinglog billinglog_1 (cost=0.42..18.01 rows=35 width=36) (actual time=0.016..0.412 rows=219 loops=1)

  • Index Cond: (exportid = '4354'::bigint)
  • Filter: (entitytypeid = 2)
  • Rows Removed by Filter: 278
22. 1.095 1.095 ↑ 1.0 1 219

Index Scan using pk_permit on permit (cost=0.42..8.44 rows=1 width=40) (actual time=0.005..0.005 rows=1 loops=219)

  • Index Cond: (id = billinglog_1.entityid)
23. 0.657 0.657 ↑ 1.0 1 219

Index Scan using pk_user on "user" user_1 (cost=0.29..7.73 rows=1 width=35) (actual time=0.003..0.003 rows=1 loops=219)

  • Index Cond: (id = billinglog_1.userid)
24. 0.438 0.438 ↑ 1.0 1 219

Index Scan using ix_organisation_id_emailenabled on organisation userorg_1 (cost=0.28..6.47 rows=1 width=33) (actual time=0.002..0.002 rows=1 loops=219)

  • Index Cond: (id = billinglog_1.userorgid)
25. 0.438 0.438 ↑ 1.0 1 219

Index Scan using ix_organisation_id_emailenabled on organisation topparentorg_1 (cost=0.28..6.47 rows=1 width=33) (actual time=0.002..0.002 rows=1 loops=219)

  • Index Cond: (id = billinglog_1.topparentorgid)
26. 0.438 0.438 ↑ 1.0 1 219

Index Scan using ix_organisation_id_emailenabled on organisation permitpsmorg (cost=0.28..0.31 rows=1 width=34) (actual time=0.002..0.002 rows=1 loops=219)

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

SubPlan (for Nested Loop)

28. 1.971 7,282.188 ↑ 1.0 1 219

Limit (cost=0.00..11,079.76 rows=1 width=8) (actual time=33.252..33.252 rows=1 loops=219)

29. 7,280.217 7,280.217 ↑ 1.0 1 219

Seq Scan on billinglog bl_1 (cost=0.00..11,079.76 rows=1 width=8) (actual time=33.243..33.243 rows=1 loops=219)

  • Filter: (entityid = billinglog_1.entityid)
  • Rows Removed by Filter: 340,247