explain.depesz.com

PostgreSQL's explain analyze made readable

Result: alQp

Settings
# exclusive inclusive rows x rows loops node
1. 459.423 87,448.174 ↑ 4.0 226,007 1

Finalize GroupAggregate (cost=5,451,577.74..5,931,734.77 rows=911,717 width=22) (actual time=64,232.602..87,448.174 rows=226,007 loops=1)

  • Group Key: w.slug, w.headword
  • Filter: (count(sw.sentence_id) >= 3)
  • Rows Removed by Filter: 273613
2. 0.000 86,988.751 ↑ 1.9 944,962 1

Gather Merge (cost=5,451,577.74..5,908,941.85 rows=1,823,434 width=30) (actual time=64,232.569..86,988.751 rows=944,962 loops=1)

  • Workers Planned: 2
  • Workers Launched: 2
3. 23,173.395 249,460.524 ↑ 2.9 314,987 3

Partial GroupAggregate (cost=5,450,577.72..5,697,472.30 rows=911,717 width=30) (actual time=63,699.586..83,153.508 rows=314,987 loops=3)

  • Group Key: w.slug, w.headword
4. 161,402.436 226,287.129 ↑ 1.2 19,028,803 3

Sort (cost=5,450,577.72..5,510,022.07 rows=23,777,741 width=26) (actual time=63,699.539..75,429.043 rows=19,028,803 loops=3)

  • Sort Key: w.slug, w.headword
  • Sort Method: external merge Disk: 508448kB
5. 43,402.128 64,884.693 ↑ 1.2 19,028,803 3

Hash Join (cost=33,662.63..830,722.90 rows=23,777,741 width=26) (actual time=769.175..21,628.231 rows=19,028,803 loops=3)

  • Hash Cond: (sw.word_id = w.id)
6. 19,175.946 19,175.946 ↑ 1.2 19,028,803 3

Parallel Seq Scan on sentences_words sw (cost=0.00..542,646.41 rows=23,777,741 width=8) (actual time=0.010..6,391.982 rows=19,028,803 loops=3)

7. 1,308.879 2,306.619 ↑ 1.0 911,717 3

Hash (cost=16,033.17..16,033.17 rows=911,717 width=26) (actual time=768.873..768.873 rows=911,717 loops=3)

  • Buckets: 65536 Batches: 32 Memory Usage: 2097kB
8. 997.740 997.740 ↑ 1.0 911,717 3

Seq Scan on words w (cost=0.00..16,033.17 rows=911,717 width=26) (actual time=0.009..332.580 rows=911,717 loops=3)