explain.depesz.com

PostgreSQL's explain analyze made readable

Result: smJ2

Settings
# exclusive inclusive rows x rows loops node
1. 0.006 164,408.554 ↑ 1.0 10 1

Limit (cost=4,414,075.13..4,414,075.15 rows=10 width=212) (actual time=164,408.548..164,408.554 rows=10 loops=1)

2. 3.475 164,408.548 ↑ 158,244.9 10 1

Sort (cost=4,414,075.13..4,418,031.25 rows=1,582,449 width=212) (actual time=164,408.546..164,408.548 rows=10 loops=1)

  • Sort Key: (count(*)) DESC
  • Sort Method: top-N heapsort Memory: 26kB
3. 2,070.743 164,405.073 ↑ 190.1 8,326 1

GroupAggregate (cost=4,348,229.99..4,379,878.97 rows=1,582,449 width=212) (actual time=152,910.071..164,405.073 rows=8,326 loops=1)

  • Group Key: d_pages.page_url
  • Filter: (count(*) >= 0)
4. 12,183.071 162,334.330 ↓ 1.1 1,667,963 1

Sort (cost=4,348,229.99..4,352,186.11 rows=1,582,449 width=204) (actual time=152,910.018..162,334.330 rows=1,667,963 loops=1)

  • Sort Key: d_pages.page_url
  • Sort Method: external merge Disk: 56152kB
5. 1,458.572 150,151.259 ↓ 1.1 1,667,963 1

Merge Join (cost=2,283,972.72..4,028,431.37 rows=1,582,449 width=204) (actual time=9,745.685..150,151.259 rows=1,667,963 loops=1)

  • Merge Cond: (d_pages.page_key = f_survey_views.page_key)
6. 141,977.619 141,977.619 ↑ 8.7 2,776,720 1

Index Scan using d_pages_pkey on d_pages (cost=0.44..1,666,667.63 rows=24,171,366 width=208) (actual time=0.007..141,977.619 rows=2,776,720 loops=1)

7. 815.560 6,715.068 ↓ 1.1 1,667,964 1

Materialize (cost=2,283,608.60..2,291,520.85 rows=1,582,449 width=4) (actual time=5,261.969..6,715.068 rows=1,667,964 loops=1)

8. 1,274.121 5,899.508 ↓ 1.1 1,667,964 1

Sort (cost=2,283,608.60..2,287,564.72 rows=1,582,449 width=4) (actual time=5,261.966..5,899.508 rows=1,667,964 loops=1)

  • Sort Key: f_survey_views.page_key
  • Sort Method: external merge Disk: 22752kB
9. 4,148.327 4,625.387 ↓ 1.1 1,668,209 1

Bitmap Heap Scan on f_survey_views (cost=284,968.54..2,099,028.98 rows=1,582,449 width=4) (actual time=508.552..4,625.387 rows=1,668,209 loops=1)

  • Recheck Cond: (survey_key = 881918575)
  • Rows Removed by Index Recheck: 18143385
  • Heap Blocks: exact=106919 lossy=725382
10. 477.060 477.060 ↓ 1.3 2,114,817 1

Bitmap Index Scan on index_f_survey_views_on_survey_key (cost=0.00..284,572.93 rows=1,582,449 width=0) (actual time=477.060..477.060 rows=2,114,817 loops=1)

  • Index Cond: (survey_key = 881918575)