explain.depesz.com

PostgreSQL's explain analyze made readable

Result: TiSs

Settings
# exclusive inclusive rows x rows loops node
1. 0.000 36.901 ↑ 1.2 34 1

Sort (cost=26,055.38..26,055.48 rows=40 width=49) (actual time=36.900..36.901 rows=34 loops=1)

  • Sort Key: m.mid
  • Sort Method: quicksort Memory: 27kB
2.          

CTE concat_words

3. 0.061 36.797 ↑ 1.5 33 1

GroupAggregate (cost=25,937.91..25,939.03 rows=50 width=40) (actual time=36.756..36.797 rows=33 loops=1)

  • Group Key: words_scores.mid
4. 0.000 36.736 ↑ 1.1 46 1

Sort (cost=25,937.91..25,938.03 rows=50 width=19) (actual time=36.733..36.736 rows=46 loops=1)

  • Sort Key: words_scores.mid
  • Sort Method: quicksort Memory: 28kB
5. 2.730 37.385 ↑ 1.1 46 1

Gather (cost=1,000.00..25,936.49 rows=50 width=19) (actual time=23.095..37.385 rows=46 loops=1)

  • Workers Planned: 2
  • Workers Launched: 2
6. 34.655 34.655 ↑ 1.4 15 3

Parallel Seq Scan on words_scores (cost=0.00..24,931.49 rows=21 width=19) (actual time=20.116..34.655 rows=15 loops=3)

  • Filter: (gid = 48856)
  • Rows Removed by Filter: 596249
7.          

Initplan (forSort)

8. 0.013 0.013 ↑ 1.0 1 1

Index Scan using words_social_pkey on words_social (cost=0.29..8.30 rows=1 width=4) (actual time=0.013..0.013 rows=1 loops=1)

  • Index Cond: ((sid = '17880121030128875114'::text) AND (social = 8))
9. 0.032 36.891 ↑ 1.2 34 1

Hash Left Join (cost=2.05..106.98 rows=40 width=49) (actual time=36.861..36.891 rows=34 loops=1)

  • Hash Cond: (m.mid = cw.mid)
10. 0.029 0.029 ↑ 1.2 34 1

Index Scan using words_moves_gid_played_idx on words_moves m (cost=0.43..104.59 rows=40 width=22) (actual time=0.011..0.029 rows=34 loops=1)

  • Index Cond: (gid = 48856)
11. 0.022 36.830 ↑ 1.5 33 1

Hash (cost=1.00..1.00 rows=50 width=40) (actual time=36.830..36.830 rows=33 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 10kB
12. 36.808 36.808 ↑ 1.5 33 1

CTE Scan on concat_words cw (cost=0.00..1.00 rows=50 width=40) (actual time=36.758..36.808 rows=33 loops=1)