explain.depesz.com

PostgreSQL's explain analyze made readable

Result: KjU2

Settings
# exclusive inclusive rows x rows loops node
1. 0.920 11.243 ↓ 204.0 204 1

Unique (cost=3,081.71..3,081.74 rows=1 width=489) (actual time=10.232..11.243 rows=204 loops=1)

2. 0.321 10.323 ↓ 204.0 204 1

Sort (cost=3,081.71..3,081.72 rows=1 width=489) (actual time=10.231..10.323 rows=204 loops=1)

  • Sort Key: ((((('0.400000000000000022'::double precision * symbol_specific.normalized_sentiment) + ((0.10 * symbol_specific.normalized_length))::double precision) + ('0.25'::double precision / symbol_specific.normalized_symbol_count)) + ('0.25'::double precision / symbol_specific.normalized_age))) DESC, symbol_specific.news_id, symbol_specific.news_time, symbol_specific.title, symbol_specific.text_no_tags, symbol_specific.symbol_count, symbol_specific.normalized_sentiment, symbol_specific.title_embedding, symbol_specific.text_embedding
  • Sort Method: quicksort Memory: 155kB
3. 0.361 10.002 ↓ 204.0 204 1

Subquery Scan on symbol_specific (cost=3,081.63..3,081.70 rows=1 width=489) (actual time=8.951..10.002 rows=204 loops=1)

4. 0.615 9.641 ↓ 204.0 204 1

Unique (cost=3,081.63..3,081.67 rows=1 width=606) (actual time=8.933..9.641 rows=204 loops=1)

5. 0.390 9.026 ↓ 204.0 204 1

Sort (cost=3,081.63..3,081.63 rows=1 width=606) (actual time=8.930..9.026 rows=204 loops=1)

  • Sort Key: n.news_id, n.title, n.text_no_tags, n.symbol_count, n.sector_count, n.industry_count, n.main_sector, n.main_industry, n.main_sub_industry, n.title_embedding, n.text_embedding, n.""time"", (timezone('America/Chicago'::text, to_timestamp(((n.""time"" / 1000))::double precision))), (abs((n.sentiment_score / '6'::double precision))), (CASE WHEN ((n.symbol_count)::numeric >= 5.0) THEN '5'::double precision ELSE (n.symbol_count)::double precision END), ((CASE WHEN ((length(n.text_no_tags))::numeric >= 1,500.0) THEN 1500.0 ELSE (length(n.text_no_tags))::numeric END / 1500.0)), ((round((date_part('epoch'::text, now()) - ((n.""time"" / 1000))::double precision)) / '60'::double precision))
  • Sort Method: quicksort Memory: 184kB
6. 4.694 8.636 ↓ 204.0 204 1

Nested Loop (cost=70.47..3,081.62 rows=1 width=606) (actual time=0.197..8.636 rows=204 loops=1)

7. 0.533 0.588 ↑ 1.0 258 1

Bitmap Heap Scan on tos_news_symbols s (cost=66.42..988.35 rows=258 width=12) (actual time=0.078..0.588 rows=258 loops=1)

  • Recheck Cond: (symbol = 'FDX'::text)
  • Heap Blocks: exact=198
8. 0.055 0.055 ↑ 1.0 258 1

Bitmap Index Scan on tos_news_symbols_symbol_index (cost=0.00..66.36 rows=258 width=0) (actual time=0.055..0.055 rows=258 loops=1)

  • Index Cond: (symbol = 'FDX'::text)
9. 2.580 3.354 ↑ 1.0 1 258

Bitmap Heap Scan on tos_news n (cost=4.05..8.11 rows=1 width=546) (actual time=0.013..0.013 rows=1 loops=258)

  • Recheck Cond: (news_id = s.news_id)
  • Filter: ((symbol_count <= 4) AND (lower(title) !~~ '%%sector update%%'::text) AND (lower(title) !~~ '%%stocks to watch%%'::text) AND (lower(title) !~~ '%%stocks moving in%%'::text) AND (lower(title) !~~ '%%close update:%%'::text) AND (lower(title) !~~ '%%a peek into the markets%%'::text) AND ((""time"")::double precision >= ('1000'::double precision * date_part('epoch'::text, '2019-01-02 05:00:00+00'::timestamp with time zone))) AND ((""time"")::double precision <= ('1000'::double precision * date_part('epoch'::text, '2019-09-25 05:00:00+00'::timestamp with time zone))))
  • Rows Removed by Filter: 0
  • Heap Blocks: exact=258
10. 0.774 0.774 ↑ 1.0 1 258

Bitmap Index Scan on tos_news_pk (cost=0.00..4.05 rows=1 width=0) (actual time=0.003..0.003 rows=1 loops=258)

  • Index Cond: (news_id = s.news_id)
Planning time : 0.938 ms
Execution time : 11.447 ms