explain.depesz.com

PostgreSQL's explain analyze made readable

Result: gLR0

Settings
# exclusive inclusive rows x rows loops node
1. 0.913 13,654.023 ↓ 31.5 3,084 1

Unique (cost=90,646.62..90,648.58 rows=98 width=398) (actual time=13,652.396..13,654.023 rows=3,084 loops=1)

2. 4.524 13,653.110 ↓ 31.5 3,084 1

Sort (cost=90,646.62..90,646.86 rows=98 width=398) (actual time=13,652.394..13,653.110 rows=3,084 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,868kB
3. 1.869 13,648.586 ↓ 31.5 3,084 1

Hash Left Join (cost=23,219.37..90,643.38 rows=98 width=398) (actual time=7,157.503..13,648.586 rows=3,084 loops=1)

  • Hash Cond: (n.publisher_id = sn.id)
4. 6,504.976 13,646.652 ↓ 31.5 3,084 1

Hash Join (cost=23,213.59..90,636.25 rows=98 width=380) (actual time=7,157.417..13,646.652 rows=3,084 loops=1)

  • Hash Cond: (rs.news_id = n.id)
5. 73.113 86.651 ↑ 1.0 62,345 1

Bitmap Heap Scan on screening_newsrelatedstock rs (cost=1,445.66..65,053.65 rows=63,126 width=4) (actual time=20.957..86.651 rows=62,345 loops=1)

  • Recheck Cond: (stock_id = 21,830)
  • Heap Blocks: exact=31,931
6. 13.538 13.538 ↑ 1.0 62,652 1

Bitmap Index Scan on screening_newsrelatedstock_stock_id_87f2bc2a (cost=0.00..1,429.88 rows=63,126 width=0) (actual time=13.538..13.538 rows=62,652 loops=1)

  • Index Cond: (stock_id = 21,830)
7. 5,169.211 7,055.025 ↓ 22.8 1,408,536 1

Hash (cost=17,911.31..17,911.31 rows=61,889 width=380) (actual time=7,055.025..7,055.025 rows=1,408,536 loops=1)

  • Buckets: 16,384 (originally 16384) Batches: 256 (originally 8) Memory Usage: 3,969kB
8. 1,885.814 1,885.814 ↓ 22.8 1,408,536 1

Index Scan using screening_acmnews_published_at_f6b6e991 on screening_acmnews n (cost=0.57..17,911.31 rows=61,889 width=380) (actual time=0.061..1,885.814 rows=1,408,536 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 > 1400000)
9. 0.036 0.065 ↑ 1.0 168 1

Hash (cost=3.68..3.68 rows=168 width=26) (actual time=0.065..0.065 rows=168 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 18kB
10. 0.029 0.029 ↑ 1.0 168 1

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

Planning time : 0.563 ms
Execution time : 13,654.783 ms