explain.depesz.com

PostgreSQL's explain analyze made readable

Result: NVAq

Settings
# exclusive inclusive rows x rows loops node
1. 0.081 7,446.118 ↑ 1.0 1 1

CTE Scan on s (cost=2.50..325.40 rows=1 width=58) (actual time=7,446.114..7,446.118 rows=1 loops=1)

  • Buffers: shared hit=862429
2.          

CTE s

3. 0.062 0.062 ↑ 1.0 1 1

Index Only Scan using symbol_unique on symbols (cost=0.28..2.50 rows=1 width=4) (actual time=0.059..0.062 rows=1 loops=1)

  • Index Cond: (symbol = 'SCP'::text)
  • Heap Fetches: 1
  • Buffers: shared hit=3
4.          

SubPlan (forCTE Scan)

5. 0.006 7,444.888 ↑ 1.0 1 1

Limit (cost=2.55..161.44 rows=1 width=16) (actual time=7,444.884..7,444.888 rows=1 loops=1)

  • Buffers: shared hit=860559
6. 0.002 7,444.882 ↑ 12,804.0 1 1

Custom Scan (ConstraintAwareAppend) (cost=2.55..2,034,538.49 rows=12,804 width=16) (actual time=7,444.881..7,444.882 rows=1 loops=1)

  • Hypertable: tickers
  • Chunks left after exclusion: 1
  • Buffers: shared hit=860559
7. 0.003 7,444.880 ↑ 12,804.0 1 1

Merge Append (cost=2.55..2,034,538.49 rows=12,804 width=16) (actual time=7,444.880..7,444.880 rows=1 loops=1)

  • Sort Key: t_1."time
  • Buffers: shared hit=860559
8. 7,444.877 7,444.877 ↑ 12,798.0 1 1

Index Scan Backward using _hyper_1_5_chunk_tickers_time_idx on _hyper_1_5_chunk t_1 (cost=0.58..2,034,312.77 rows=12,798 width=16) (actual time=7,444.877..7,444.877 rows=1 loops=1)

  • Index Cond: ("time" > (now() - '1 mon'::interval))
  • Filter: ((symbol)::text = (s.symbol)::text)
  • Rows Removed by Filter: 37651419
  • Buffers: shared hit=860559
9. 0.009 1.149 ↑ 1.0 1 1

Limit (cost=2.55..161.44 rows=1 width=16) (actual time=1.148..1.149 rows=1 loops=1)

  • Buffers: shared hit=1867
10. 0.001 1.140 ↑ 12,804.0 1 1

Custom Scan (ConstraintAwareAppend) (cost=2.55..2,034,538.49 rows=12,804 width=16) (actual time=1.140..1.140 rows=1 loops=1)

  • Hypertable: tickers
  • Chunks left after exclusion: 1
  • Buffers: shared hit=1867
11. 0.001 1.139 ↑ 12,804.0 1 1

Merge Append (cost=2.55..2,034,538.49 rows=12,804 width=16) (actual time=1.139..1.139 rows=1 loops=1)

  • Sort Key: t_3."time" DESC
  • Buffers: shared hit=1867
12. 1.138 1.138 ↑ 12,798.0 1 1

Index Scan using _hyper_1_5_chunk_tickers_time_idx on _hyper_1_5_chunk t_3 (cost=0.58..2,034,312.77 rows=12,798 width=16) (actual time=1.138..1.138 rows=1 loops=1)

  • Index Cond: ("time" > (now() - '1 mon'::interval))
  • Filter: ((symbol)::text = (s.symbol)::text)
  • Rows Removed by Filter: 1857
  • Buffers: shared hit=1867