explain.depesz.com

PostgreSQL's explain analyze made readable

Result: YnLm

Settings
# exclusive inclusive rows x rows loops node
1. 7.214 40.483 ↑ 88.2 32,445 1

Hash Left Join (cost=1,562.06..53,653.43 rows=2,862,496 width=2,524) (actual time=14.192..40.483 rows=32,445 loops=1)

  • Hash Cond: (site0_.site_id = trunkpaisi8_.site_id)
  • Buffers: shared hit=491
2. 7.025 33.257 ↑ 88.2 32,445 1

Hash Left Join (cost=1,553.89..14,285.94 rows=2,862,496 width=2,348) (actual time=14.167..33.257 rows=32,445 loops=1)

  • Hash Cond: (users3_.user_id = user4_.user_id)
  • Buffers: shared hit=490
3. 5.618 25.953 ↑ 1.0 32,445 1

Nested Loop Left Join (cost=1,350.37..1,814.47 rows=33,455 width=868) (actual time=13.833..25.953 rows=32,445 loops=1)

  • Join Filter: (site0_.site_id = testsummar2_.site_id)
  • Buffers: shared hit=486
4. 0.002 0.052 ↑ 1.0 1 1

Nested Loop Left Join (cost=0.29..16.38 rows=1 width=557) (actual time=0.046..0.052 rows=1 loops=1)

  • Buffers: shared hit=4
5. 0.029 0.029 ↑ 1.0 1 1

Index Scan using pk_site on site site0_ (cost=0.14..8.16 rows=1 width=299) (actual time=0.023..0.029 rows=1 loops=1)

  • Index Cond: (site_id = 20)
  • Buffers: shared hit=2
6. 0.021 0.021 ↑ 1.0 1 1

Index Scan using pk_customer on customer customer1_ (cost=0.15..8.17 rows=1 width=258) (actual time=0.021..0.021 rows=1 loops=1)

  • Index Cond: (site0_.customer_id = customer_id)
  • Buffers: shared hit=2
7. 6.822 20.283 ↑ 1.0 32,445 1

Hash Right Join (cost=1,350.08..1,379.90 rows=33,455 width=311) (actual time=13.785..20.283 rows=32,445 loops=1)

  • Hash Cond: (users3_.test_summary_id = testsummar2_.test_summary_id)
  • Buffers: shared hit=482
8. 0.009 0.009 ↑ 785.0 2 1

Seq Scan on test_summary_user_rel users3_ (cost=0.00..25.70 rows=1,570 width=16) (actual time=0.009..0.009 rows=2 loops=1)

  • Buffers: shared hit=1
9. 7.333 13.452 ↑ 1.0 32,445 1

Hash (cost=931.89..931.89 rows=33,455 width=295) (actual time=13.452..13.452 rows=32,445 loops=1)

  • Buckets: 65536 Batches: 1 Memory Usage: 2921kB
  • Buffers: shared hit=481
10. 6.119 6.119 ↑ 1.0 32,445 1

Seq Scan on test_summary testsummar2_ (cost=0.00..931.89 rows=33,455 width=295) (actual time=0.020..6.119 rows=32,445 loops=1)

  • Filter: (site_id = 20)
  • Rows Removed by Filter: 3406
  • Buffers: shared hit=481
11. 0.120 0.279 ↑ 18.4 279 1

Hash (cost=139.34..139.34 rows=5,134 width=1,488) (actual time=0.279..0.279 rows=279 loops=1)

  • Buckets: 8192 Batches: 1 Memory Usage: 130kB
  • Buffers: shared hit=4
12. 0.060 0.159 ↑ 18.4 279 1

Hash Left Join (cost=70.01..139.34 rows=5,134 width=1,488) (actual time=0.107..0.159 rows=279 loops=1)

  • Hash Cond: (roles5_.role_id = userrole6_.role_id)
  • Buffers: shared hit=4
13. 0.021 0.046 ↑ 37.0 15 1

Hash Right Join (cost=11.35..44.81 rows=555 width=1,322) (actual time=0.038..0.046 rows=15 loops=1)

  • Hash Cond: (roles5_.user_id = user4_.user_id)
  • Buffers: shared hit=2
14. 0.005 0.005 ↑ 123.3 15 1

Seq Scan on users_to_roles roles5_ (cost=0.00..28.50 rows=1,850 width=16) (actual time=0.003..0.005 rows=15 loops=1)

  • Buffers: shared hit=1
15. 0.012 0.020 ↑ 5.5 11 1

Hash (cost=10.60..10.60 rows=60 width=1,306) (actual time=0.020..0.020 rows=11 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 11kB
  • Buffers: shared hit=1
16. 0.008 0.008 ↑ 5.5 11 1

Seq Scan on users user4_ (cost=0.00..10.60 rows=60 width=1,306) (actual time=0.006..0.008 rows=11 loops=1)

  • Buffers: shared hit=1
17. 0.009 0.053 ↑ 29.1 35 1

Hash (cost=45.93..45.93 rows=1,018 width=174) (actual time=0.053..0.053 rows=35 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 11kB
  • Buffers: shared hit=2
18. 0.027 0.044 ↑ 29.1 35 1

Hash Right Join (cost=12.47..45.93 rows=1,018 width=174) (actual time=0.033..0.044 rows=35 loops=1)

  • Hash Cond: (permission7_.role_id = userrole6_.role_id)
  • Buffers: shared hit=2
19. 0.006 0.006 ↑ 56.1 33 1

Seq Scan on role_permissions permission7_ (cost=0.00..28.50 rows=1,850 width=16) (actual time=0.004..0.006 rows=33 loops=1)

  • Buffers: shared hit=1
20. 0.007 0.011 ↑ 27.5 4 1

Hash (cost=11.10..11.10 rows=110 width=158) (actual time=0.011..0.011 rows=4 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
  • Buffers: shared hit=1
21. 0.004 0.004 ↑ 27.5 4 1

Seq Scan on user_roles userrole6_ (cost=0.00..11.10 rows=110 width=158) (actual time=0.004..0.004 rows=4 loops=1)

  • Buffers: shared hit=1
22. 0.000 0.012 ↓ 0.0 0 1

Hash (cost=8.17..8.17 rows=1 width=144) (actual time=0.012..0.012 rows=0 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 8kB
  • Buffers: shared hit=1
23. 0.012 0.012 ↓ 0.0 0 1

Index Scan using bvoip_site_site_id_key on trunk_pai_site trunkpaisi8_ (cost=0.15..8.17 rows=1 width=144) (actual time=0.012..0.012 rows=0 loops=1)

  • Index Cond: (site_id = 20)
  • Buffers: shared hit=1
Planning time : 1.099 ms
Execution time : 42.082 ms