explain.depesz.com

PostgreSQL's explain analyze made readable

Result: xWcEp

Settings
# exclusive inclusive rows x rows loops node
1. 0.007 8,775.637 ↓ 7.1 50 1

Limit (cost=42,533.67..42,533.81 rows=7 width=398) (actual time=8,775.568..8,775.637 rows=50 loops=1)

2. 0.053 8,775.630 ↓ 7.1 50 1

Unique (cost=42,533.67..42,533.81 rows=7 width=398) (actual time=8,775.567..8,775.630 rows=50 loops=1)

3. 20.393 8,775.577 ↓ 7.1 50 1

Sort (cost=42,533.67..42,533.68 rows=7 width=398) (actual time=8,775.565..8,775.577 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. 166.196 8,755.184 ↓ 440.7 3,085 1

Nested Loop Left Join (cost=1.01..42,533.57 rows=7 width=398) (actual time=30.718..8,755.184 rows=3,085 loops=1)

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

Nested Loop (cost=1.01..42,511.83 rows=7 width=380) (actual time=30.296..8,518.033 rows=3,085 loops=1)

6. 2,241.797 2,241.797 ↓ 312.1 1,409,891 1

Index Scan using screening_acmnews_published_at_f6b6e991 on screening_acmnews n (cost=0.57..17,923.42 rows=4,517 width=380) (actual time=0.053..2,241.797 rows=1,409,891 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. 5,639.564 5,639.564 ↓ 0.0 0 1,409,891

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.004..0.004 rows=0 loops=1,409,891)

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

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

9. 0.052 0.052 ↑ 1.0 168 1

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

Planning time : 2.182 ms
Execution time : 8,776.025 ms