explain.depesz.com

PostgreSQL's explain analyze made readable

Result: d5RZ

Settings
# exclusive inclusive rows x rows loops node
1. 6.027 112,824.623 ↓ 1.4 101,199 1

Limit (cost=513,771.89..517,973.78 rows=70,189 width=37) (actual time=112,739.584..112,824.623 rows=101,199 loops=1)

2. 47.297 112,818.596 ↓ 1.4 101,199 1

GroupAggregate (cost=513,771.89..517,973.78 rows=70,189 width=37) (actual time=112,739.583..112,818.596 rows=101,199 loops=1)

  • Group Key: wordsearch.sentencenum, citationsearch.sentencenum, wordsearch.articleyear, wordsearch.articleid, ((((((wordsearch.startlocationpaper)::double precision + (wordsearch.endlocationpaper)::double precision) / '2'::double precision) / (wordsearch.articlecharcount)::double precision) * '100'::double precision))
3. 319.914 112,771.299 ↑ 1.0 200,000 1

Sort (cost=513,771.89..514,271.89 rows=200,000 width=29) (actual time=112,739.575..112,771.299 rows=200,000 loops=1)

  • Sort Key: wordsearch.sentencenum, citationsearch.sentencenum, wordsearch.articleyear, wordsearch.articleid, ((((((wordsearch.startlocationpaper)::double precision + (wordsearch.endlocationpaper)::double precision) / '2'::double precision) / (wordsearch.articlecharcount)::double precision) * '100'::double precision))
  • Sort Method: external merge Disk: 8232kB
4. 12.727 112,451.385 ↑ 1.0 200,000 1

Limit (cost=471,942.04..489,374.24 rows=200,000 width=29) (actual time=3,767.912..112,451.385 rows=200,000 loops=1)

5. 2,999.380 112,438.658 ↑ 7,683.7 200,000 1

Hash Join (cost=471,942.04..134,416,593.77 rows=1,536,749,611 width=29) (actual time=3,767.911..112,438.658 rows=200,000 loops=1)

  • Hash Cond: ((wordsearch.articleid)::text = (citationsearch.articleid)::text)
6. 105,720.318 105,720.318 ↑ 1.9 10,368,495 1

Seq Scan on wordsearch (cost=0.00..18,401,356.00 rows=19,465,861 width=29) (actual time=0.022..105,720.318 rows=10,368,495 loops=1)

  • Filter: (articleyear = 2010)
  • Rows Removed by Filter: 442590807
7. 1,845.911 3,718.960 ↑ 1.0 8,990,313 1

Hash (cost=315,664.13..315,664.13 rows=8,990,313 width=13) (actual time=3,718.960..3,718.960 rows=8,990,313 loops=1)

  • Buckets: 131072 Batches: 256 Memory Usage: 2555kB
8. 1,873.049 1,873.049 ↑ 1.0 8,990,313 1

Seq Scan on citationsearch (cost=0.00..315,664.13 rows=8,990,313 width=13) (actual time=0.036..1,873.049 rows=8,990,313 loops=1)

Planning time : 0.522 ms
Execution time : 112,918.421 ms