explain.depesz.com

PostgreSQL's explain analyze made readable

Result: VSci

Settings
# exclusive inclusive rows x rows loops node
1. 0.008 345.900 ↑ 2.0 1 1

Sort (cost=11,194.89..11,194.89 rows=2 width=103) (actual time=345.900..345.900 rows=1 loops=1)

  • Sort Key: cg.name
  • Sort Method: quicksort Memory: 25kB
2. 0.009 345.892 ↑ 2.0 1 1

Nested Loop (cost=10,883.99..11,194.88 rows=2 width=103) (actual time=345.796..345.892 rows=1 loops=1)

3. 0.009 345.862 ↑ 2.0 1 1

Merge Right Join (cost=10,883.72..11,193.47 rows=2 width=86) (actual time=345.767..345.862 rows=1 loops=1)

  • Merge Cond: (candidate_group_candidate_1.candidate_group_id = cg.id)
4. 0.504 343.922 ↑ 137.6 5 1

GroupAggregate (cost=10,830.02..11,131.14 rows=688 width=8) (actual time=343.106..343.922 rows=5 loops=1)

  • Group Key: candidate_group_candidate_1.candidate_group_id
5. 19.220 343.418 ↑ 40.9 959 1

Sort (cost=10,830.02..10,928.10 rows=39,233 width=8) (actual time=343.073..343.418 rows=959 loops=1)

  • Sort Key: candidate_group_candidate_1.candidate_group_id
  • Sort Method: quicksort Memory: 3150kB
6. 150.218 324.198 ↑ 1.0 39,233 1

Merge Join (cost=0.77..7,836.58 rows=39,233 width=8) (actual time=0.030..324.198 rows=39,233 loops=1)

  • Merge Cond: (candidate_group_candidate_1.candidate_id = can.id)
7. 26.791 26.791 ↑ 1.0 39,233 1

Index Scan using candidate_group_candidate_candidate_id_idx on candidate_group_candidate candidate_group_candidate_1 (cost=0.29..977.43 rows=39,233 width=8) (actual time=0.013..26.791 rows=39,233 loops=1)

8. 147.189 147.189 ↓ 1.0 311,302 1

Index Only Scan using candidate_pkey on candidate can (cost=0.42..5,645.18 rows=297,777 width=8) (actual time=0.012..147.189 rows=311,302 loops=1)

  • Heap Fetches: 8997
9. 0.010 1.931 ↑ 2.0 1 1

Sort (cost=53.70..53.71 rows=2 width=78) (actual time=1.931..1.931 rows=1 loops=1)

  • Sort Key: cg.id
  • Sort Method: quicksort Memory: 25kB
10. 0.151 1.921 ↑ 2.0 1 1

Hash Right Join (cost=42.38..53.69 rows=2 width=78) (actual time=1.714..1.921 rows=1 loops=1)

  • Hash Cond: (candidate_group_user_account.candidate_group_id = cg.id)
11. 1.221 1.713 ↑ 1.1 353 1

HashAggregate (cost=36.35..42.25 rows=393 width=8) (actual time=1.243..1.713 rows=353 loops=1)

  • Group Key: candidate_group_user_account.candidate_group_id
12. 0.492 0.492 ↑ 1.1 1,495 1

Seq Scan on candidate_group_user_account (cost=0.00..27.90 rows=1,690 width=8) (actual time=0.006..0.492 rows=1,495 loops=1)

13. 0.019 0.057 ↑ 2.0 1 1

Hash (cost=6.01..6.01 rows=2 width=46) (actual time=0.057..0.057 rows=1 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
14. 0.009 0.038 ↑ 2.0 1 1

Nested Loop (cost=3.77..6.01 rows=2 width=46) (actual time=0.036..0.038 rows=1 loops=1)

15. 0.010 0.020 ↑ 1.0 1 1

HashAggregate (cost=3.50..3.51 rows=1 width=4) (actual time=0.020..0.020 rows=1 loops=1)

  • Group Key: candidate_group_candidate.candidate_group_id
16. 0.010 0.010 ↑ 2.0 1 1

Index Scan using candidate_group_candidate_candidate_id_idx on candidate_group_candidate (cost=0.29..3.49 rows=2 width=4) (actual time=0.010..0.010 rows=1 loops=1)

  • Index Cond: (candidate_id = 334460)
17. 0.009 0.009 ↑ 1.0 1 1

Index Scan using candidate_group_pkey on candidate_group cg (cost=0.28..2.49 rows=1 width=46) (actual time=0.008..0.009 rows=1 loops=1)

  • Index Cond: (id = candidate_group_candidate.candidate_group_id)
18. 0.021 0.021 ↑ 1.0 1 1

Index Scan using client_account_pkey on user_account (cost=0.27..0.70 rows=1 width=21) (actual time=0.021..0.021 rows=1 loops=1)

  • Index Cond: (id = cg.owner_id)