explain.depesz.com

PostgreSQL's explain analyze made readable

Result: AVVf

Settings
# exclusive inclusive rows x rows loops node
1. 0.009 10,478.564 ↓ 7.1 50 1

Limit (cost=42,532.83..42,532.97 rows=7 width=398) (actual time=10,478.517..10,478.564 rows=50 loops=1)

2. 0.026 10,478.555 ↓ 7.1 50 1

Unique (cost=42,532.83..42,532.97 rows=7 width=398) (actual time=10,478.517..10,478.555 rows=50 loops=1)

3. 8.783 10,478.529 ↓ 7.1 50 1

Sort (cost=42,532.83..42,532.85 rows=7 width=398) (actual time=10,478.515..10,478.529 rows=50 loops=1)

  • Sort Key: n.published_at DESC, n.id, n.title, n.description, n.impact, sn.acronym, sn.name
  • Sort Method: quicksort Memory: 1,869kB
4. 162.076 10,469.746 ↓ 440.7 3,085 1

Nested Loop Left Join (cost=1.01..42,532.73 rows=7 width=398) (actual time=6.809..10,469.746 rows=3,085 loops=1)

  • Join Filter: (n.publisher_id = sn.id)
  • Rows Removed by Join Filter: 515,195
5. 539.977 10,255.225 ↓ 440.7 3,085 1

Nested Loop (cost=1.01..42,510.99 rows=7 width=380) (actual time=6.770..10,255.225 rows=3,085 loops=1)

6. 2,666.933 2,666.933 ↓ 312.1 1,409,663 1

Index Scan using screening_acmnews_published_at_f6b6e991 on screening_acmnews n (cost=0.57..17,922.59 rows=4,517 width=380) (actual time=0.049..2,666.933 rows=1,409,663 loops=1)

  • Index Cond: ((published_at >= '2020-06-19 00:00:00+00'::timestamp with time zone) AND (published_at < (now() + '00:02:00'::interval)))
  • Filter: (id > 50946125)
7. 7,048.315 7,048.315 ↓ 0.0 0 1,409,663

Index Only Scan using screening_newsrelatedstock_news_id_stock_id_b97326b9_uniq on screening_newsrelatedstock rs (cost=0.43..5.43 rows=1 width=4) (actual time=0.005..0.005 rows=0 loops=1,409,663)

  • Index Cond: ((news_id = n.id) AND (stock_id = 21,830))
  • Heap Fetches: 3,085
8. 52.406 52.445 ↑ 1.0 168 3,085

Materialize (cost=0.00..4.52 rows=168 width=26) (actual time=0.002..0.017 rows=168 loops=3,085)

9. 0.039 0.039 ↑ 1.0 168 1

Seq Scan on screening_newspublisher sn (cost=0.00..3.68 rows=168 width=26) (actual time=0.004..0.039 rows=168 loops=1)

Planning time : 0.799 ms
Execution time : 10,478.870 ms