explain.depesz.com

PostgreSQL's explain analyze made readable

Result: sJER

Settings
# exclusive inclusive rows x rows loops node
1. 0.499 8,203.856 ↑ 1.0 5,000 1

Limit (cost=21,427,603.3..21,427,615.8 rows=5,000 width=31) (actual time=8,203.05..8,203.856 rows=5,000 loops=1)

  • Buffers: shared hit=12,164,937, temp read=146,724 written=147,050
2. 15.740 8,203.357 ↑ 10.4 5,000 1

Sort (cost=21,427,603.3..21,427,733.43 rows=52,051 width=31) (actual time=8,203.049..8,203.357 rows=5,000 loops=1)

  • Sort Key: (sum(pc.phrasecount)) DESC
  • Sort Method: top-N heapsort Memory: 1,043kB
  • Buffers: shared hit=4,100,353, temp read=49,771 written=49,881
3. 23.382 8,187.617 ↑ 1.0 51,411 1

GroupAggregate (cost=21,162,762.2..21,424,145.11 rows=52,051 width=31) (actual time=6,000.207..8,187.617 rows=51,411 loops=1)

  • Group Key: p.phraseid
  • Buffers: shared hit=4,100,353, temp read=49,771 written=49,881
4. 183.842 8,164.235 ↓ 1.5 154,215 1

Gather Merge (cost=21,162,762.2..21,423,104.09 rows=104,102 width=31) (actual time=6,000.172..8,164.235 rows=154,215 loops=1)

  • Workers Planned: 2
  • Workers Launched: 2
  • Buffers: shared hit=12,164,937, temp read=146,724 written=147,050
5. 540.570 7,980.393 ↑ 1.0 51,405 3 / 3

GroupAggregate (cost=21,161,762.17..21,410,088.11 rows=52,051 width=31) (actual time=5,879.005..7,980.393 rows=51,405 loops=3)

  • Group Key: p.phraseid
  • Buffers: shared hit=12,164,937, temp read=146,724 written=147,050
6. 877.566 7,439.823 ↑ 2.0 6,105,699 3 / 3

Merge Join (cost=21,161,762.17..21,348,532.96 rows=12,206,927 width=25) (actual time=5,878.973..7,439.823 rows=6,105,699 loops=3)

  • Buffers: shared hit=12,164,937, temp read=146,724 written=147,050
7. 3,683.695 6,517.362 ↑ 2.0 6,105,699 3 / 3

Sort (cost=21,161,761.88..21,192,279.2 rows=12,206,927 width=10) (actual time=5,878.924..6,517.362 rows=6,105,699 loops=3)

  • Sort Key: pc.phraseid
  • Sort Method: external merge Disk: 157,120kB
  • Buffers: shared hit=12,120,652, temp read=146,724 written=147,050
8. 697.169 2,833.667 ↑ 2.0 6,105,699 3 / 3

Nested Loop (cost=1..19,307,698.53 rows=12,206,927 width=10) (actual time=0.065..2,833.667 rows=6,105,699 loops=3)

  • Buffers: shared hit=12,120,644
9. 3.165 3.165 ↑ 1.2 16,667 3 / 3

Index Only Scan using pk_sampledinteractions on sampledinteractions si (cost=0.42..9,807.3 rows=20,817 width=8) (actual time=0.029..3.165 rows=16,667 loops=3)

  • Index Cond: (si.jobid = 'cc55f4c2-682e-423d-b07b-ee744f23308f'::uuid)
  • Buffers: shared hit=320
10. 2,133.333 2,133.333 ↑ 1.6 366 50,000 / 3

Index Scan using pk_phrasecount on phrasecount pc (cost=0.58..921.16 rows=587 width=18) (actual time=0.01..0.128 rows=366 loops=50,000)

  • Index Cond: (pc.interactionid = si.interactionid)
  • Buffers: shared hit=12,120,324
11. 44.895 44.895 ↑ 1.0 52,051 3 / 3

Index Scan using pk_phrase on phrase p (cost=0.29..3,537.05 rows=52,051 width=23) (actual time=0.043..44.895 rows=52,051 loops=3)

  • Buffers: shared hit=44,285
Planning time : 23.997 ms
Execution time : 8,222.223 ms