explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 1HT9

Settings
# exclusive inclusive rows x rows loops node
1. 0.005 35.619 ↑ 1.0 20 1

Limit (cost=10,788.35..10,788.40 rows=20 width=797) (actual time=35.612..35.619 rows=20 loops=1)

2. 1.874 35.614 ↑ 38.0 20 1

Sort (cost=10,788.35..10,790.26 rows=761 width=797) (actual time=35.610..35.614 rows=20 loops=1)

  • Sort Key: date
  • Sort Method: top-N heapsort Memory: 40kB
3. 27.495 33.740 ↑ 1.1 721 1

Bitmap Heap Scan on posts_temp (cost=147.20..10,768.10 rows=761 width=797) (actual time=7.014..33.740 rows=721 loops=1)

  • Recheck Cond: ((mentioned_topics && '{52,54,55,56,57,99,341}'::text[]) OR (mentioned_uids && '{2087947767926096,401328537106759,441940055873460,132560043518789,1196463420517229,urn:li:organizationBrand:9394172}'::text[]))
  • Filter: ((date >= '2019-05-05 14:00:00'::timestamp without time zone) AND (date <= '2019-05-13 13:59:59.999999'::timestamp without time zone))
  • Rows Removed by Filter: 3428
  • Heap Blocks: exact=3525
4. 0.003 6.245 ↓ 0.0 0 1

BitmapOr (cost=147.20..147.20 rows=4,109 width=0) (actual time=6.245..6.245 rows=0 loops=1)

5. 6.188 6.188 ↓ 1.0 4,149 1

Bitmap Index Scan on idx_mentioned_topics (cost=0.00..94.22 rows=4,029 width=0) (actual time=6.188..6.188 rows=4,149 loops=1)

  • Index Cond: (mentioned_topics && '{52,54,55,56,57,99,341}'::text[])
6. 0.054 0.054 ↓ 0.0 0 1

Bitmap Index Scan on idx_mentioned_uids (cost=0.00..52.60 rows=80 width=0) (actual time=0.054..0.054 rows=0 loops=1)

  • Index Cond: (mentioned_uids && '{2087947767926096,401328537106759,441940055873460,132560043518789,1196463420517229,urn:li:organizationBrand:9394172}'::text[])
Planning time : 5.018 ms
Execution time : 36.393 ms