explain.depesz.com

PostgreSQL's explain analyze made readable

Result: HWJJ

Settings
# exclusive inclusive rows x rows loops node
1. 0.012 15,065.687 ↑ 1.0 50 1

Limit (cost=90,870.50..90,871.50 rows=50 width=398) (actual time=15,065.633..15,065.687 rows=50 loops=1)

2. 0.035 15,065.675 ↑ 2.0 50 1

Unique (cost=90,870.50..90,872.46 rows=98 width=398) (actual time=15,065.632..15,065.675 rows=50 loops=1)

3. 8.887 15,065.640 ↑ 2.0 50 1

Sort (cost=90,870.50..90,870.75 rows=98 width=398) (actual time=15,065.631..15,065.640 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,868kB
4. 97.070 15,056.753 ↓ 31.5 3,084 1

Nested Loop Left Join (cost=23,196.68..90,867.26 rows=98 width=398) (actual time=7,158.895..15,056.753 rows=3,084 loops=1)

  • Join Filter: (n.publisher_id = sn.id)
  • Rows Removed by Join Filter: 515,028
5. 7,784.433 14,916.507 ↓ 31.5 3,084 1

Hash Join (cost=23,196.68..90,616.20 rows=98 width=380) (actual time=7,158.854..14,916.507 rows=3,084 loops=1)

  • Hash Cond: (rs.news_id = n.id)
6. 109.766 129.007 ↑ 1.0 62,345 1

Bitmap Heap Scan on screening_newsrelatedstock rs (cost=1,445.65..65,052.51 rows=63,125 width=4) (actual time=26.070..129.007 rows=62,345 loops=1)

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

Bitmap Index Scan on screening_newsrelatedstock_stock_id_87f2bc2a (cost=0.00..1,429.87 rows=63,125 width=0) (actual time=19.241..19.241 rows=62,652 loops=1)

  • Index Cond: (stock_id = 21,830)
8. 4,691.130 7,003.067 ↓ 22.8 1,407,715 1

Hash (cost=17,896.89..17,896.89 rows=61,851 width=380) (actual time=7,003.067..7,003.067 rows=1,407,715 loops=1)

  • Buckets: 16,384 (originally 16384) Batches: 256 (originally 8) Memory Usage: 3,969kB
9. 2,311.937 2,311.937 ↓ 22.8 1,407,715 1

Index Scan using screening_acmnews_published_at_f6b6e991 on screening_acmnews n (cost=0.57..17,896.89 rows=61,851 width=380) (actual time=0.041..2,311.937 rows=1,407,715 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)
10. 43.146 43.176 ↑ 1.0 168 3,084

Materialize (cost=0.00..4.52 rows=168 width=26) (actual time=0.000..0.014 rows=168 loops=3,084)

11. 0.030 0.030 ↑ 1.0 168 1

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

Planning time : 0.850 ms
Execution time : 15,066.431 ms