explain.depesz.com

PostgreSQL's explain analyze made readable

Result: FlGh : tsdb_slow02

Settings
# exclusive inclusive rows x rows loops node
1. 5.503 1,314.595 ↑ 2.5 4,717 1

Sort (cost=32,269.48..32,298.94 rows=11,784 width=576) (actual time=1,313.764..1,314.595 rows=4,717 loops=1)

  • Output: bet_hist.ts, bet_hist.market_version, bet_hist.total_traded, bet_hist.market_id, bet_hist.selection_id, bet_hist.market_status_id, bet_hist.starting_price_near, bet_hist.starting_price_far, bet_hist.starting_price_near_calc, bet_hist.starting_price_far_calc, bet_hist.reconciliation_stake, bet_hist.last_traded_price, bet_hist.in_play, bet_hist.delta_update, bet_hist.to_back_price, bet_hist.to_lay_price, bet_hist.to_back_avail, bet_hist.to_lay_avail, bet_hist.starting_price_to_back_price, bet_hist.starting_price_to_lay_price, bet_hist.starting_price_to_back_avail, bet_hist.starting_price_to_lay_avail, bet_hist.best_display_to_back_price, bet_hist.best_display_to_back_avail, bet_hist.best_display_to_lay_price, bet_hist.best_display_to_lay_avail, bet_hist.best_display_to_back_level, bet_hist.best_display_to_lay_level, bet_hist.traded_detail_price, bet_hist.traded_detail_amount, bet_hist.exchange_id
  • Sort Key: bet_hist.ts DESC
  • Sort Method: quicksort Memory: 2320kB
  • Buffers: shared hit=156 read=6144
2. 1.040 1,309.092 ↑ 2.5 4,717 1

Custom Scan (ChunkAppend) on public.bet_hist (cost=0.43..31,472.61 rows=11,784 width=576) (actual time=49.253..1,309.092 rows=4,717 loops=1)

  • Output: bet_hist.ts, bet_hist.market_version, bet_hist.total_traded, bet_hist.market_id, bet_hist.selection_id, bet_hist.market_status_id, bet_hist.starting_price_near, bet_hist.starting_price_far, bet_hist.starting_price_near_calc, bet_hist.starting_price_far_calc, bet_hist.reconciliation_stake, bet_hist.last_traded_price, bet_hist.in_play, bet_hist.delta_update, bet_hist.to_back_price, bet_hist.to_lay_price, bet_hist.to_back_avail, bet_hist.to_lay_avail, bet_hist.starting_price_to_back_price, bet_hist.starting_price_to_lay_price, bet_hist.starting_price_to_back_avail, bet_hist.starting_price_to_lay_avail, bet_hist.best_display_to_back_price, bet_hist.best_display_to_back_avail, bet_hist.best_display_to_lay_price, bet_hist.best_display_to_lay_avail, bet_hist.best_display_to_back_level, bet_hist.best_display_to_lay_level, bet_hist.traded_detail_price, bet_hist.traded_detail_amount, bet_hist.exchange_id
  • Startup Exclusion: true
  • Runtime Exclusion: false
  • Chunks excluded during startup: 11773
  • Buffers: shared hit=156 read=6144
3. 1,308.052 1,308.052 ↓ 428.8 4,717 1

Index Scan using _hyper_1_16351_chunk_ix_bet_hist_market_id_selection_id_inc on _timescaledb_internal._hyper_1_16351_chunk (cost=0.43..105.42 rows=11 width=576) (actual time=49.251..1,308.052 rows=4,717 loops=1)

  • Output: _hyper_1_16351_chunk.ts, _hyper_1_16351_chunk.market_version, _hyper_1_16351_chunk.total_traded, _hyper_1_16351_chunk.market_id, _hyper_1_16351_chunk.selection_id, _hyper_1_16351_chunk.market_status_id, _hyper_1_16351_chunk.starting_price_near, _hyper_1_16351_chunk.starting_price_far, _hyper_1_16351_chunk.starting_price_near_calc, _hyper_1_16351_chunk.starting_price_far_calc, _hyper_1_16351_chunk.reconciliation_stake, _hyper_1_16351_chunk.last_traded_price, _hyper_1_16351_chunk.in_play, _hyper_1_16351_chunk.delta_update, _hyper_1_16351_chunk.to_back_price, _hyper_1_16351_chunk.to_lay_price, _hyper_1_16351_chunk.to_back_avail, _hyper_1_16351_chunk.to_lay_avail, _hyper_1_16351_chunk.starting_price_to_back_price, _hyper_1_16351_chunk.starting_price_to_lay_price, _hyper_1_16351_chunk.starting_price_to_back_avail, _hyper_1_16351_chunk.starting_price_to_lay_avail, _hyper_1_16351_chunk.best_display_to_back_price, _hyper_1_16351_chunk.best_display_to_back_avail, _hyper_1_16351_chunk.best_display_to_lay_price, _hyper_1_16351_chunk.best_display_to_lay_avail, _hyper_1_16351_chunk.best_display_to_back_level, _hyper_1_16351_chunk.best_display_to_lay_level, _hyper_1_16351_chunk.traded_detail_price, _hyper_1_16351_chunk.traded_detail_amount, _hyper_1_16351_chunk.exchange_id
  • Index Cond: ((_hyper_1_16351_chunk.market_id = 314999720) AND (_hyper_1_16351_chunk.selection_id = 333202565))
  • Filter: ((_hyper_1_16351_chunk.ts > ('2019-09-09 19:22:04+00'::timestamp with time zone - '00:01:00'::interval)) AND (_hyper_1_16351_chunk.ts <= ('2019-09-09 19:32:04+00'::timestamp with time zone + '00:00:20'::interval)))
  • Rows Removed by Filter: 6343
  • Buffers: shared hit=156 read=6144
Planning time : 283,966.941 ms
Execution time : 2,398.527 ms