explain.depesz.com

PostgreSQL's explain analyze made readable

Result: Ykf6m

Settings
# exclusive inclusive rows x rows loops node
1. 9.707 122.211 ↓ 27.5 10,985 1

Nested Loop (cost=0.43..634.42 rows=400 width=56) (actual time=0.046..122.211 rows=10,985 loops=1)

2. 1.809 1.809 ↓ 211.2 845 1

Index Scan using idx_std_is_temporary_stdtype_id_datetrunc on stock_trade_data (cost=0.43..24.66 rows=4 width=52) (actual time=0.031..1.809 rows=845 loops=1)

  • Index Cond: ((stock_id = 1244) AND (stock_trade_data_type_id = 1) AND (date_trunc('minute'::text, trade_time) > '2019-11-04 13:05:00'::timestamp without time zone) AND (is_live = true))
  • Filter: (is_live AND is_visible AND (stock_trade_data_series_id = ANY ('{1,2,3}'::integer[])))
  • Rows Removed by Filter: 4
3. 0.839 0.845 ↑ 7.7 13 845

Materialize (cost=0.00..2.01 rows=100 width=4) (actual time=0.000..0.001 rows=13 loops=845)

4. 0.006 0.006 ↑ 7.7 13 1

Result (cost=0.00..0.51 rows=100 width=0) (actual time=0.005..0.006 rows=13 loops=1)

5.          

SubPlan (for Nested Loop)

6. 63.375 109.850 ↑ 1.0 1 10,985

Result (cost=1.23..1.51 rows=1 width=0) (actual time=0.010..0.010 rows=1 loops=10,985)

7.          

Initplan (for Result)

8. 46.475 46.475 ↑ 1.0 1 9,295

Seq Scan on stock_trade_data_types (cost=0.00..1.23 rows=1 width=58) (actual time=0.004..0.005 rows=1 loops=9,295)

  • Filter: (id = (unnest('{1,2,3,4,5,6,7,8,9,10,16,17,18}'::integer[])))
  • Rows Removed by Filter: 17
Planning time : 0.316 ms