explain.depesz.com

PostgreSQL's explain analyze made readable

Result: zRKV

Settings

Optimization(s) for this plan:

# exclusive inclusive rows x rows loops node
1. 5.250 343.634 ↑ 1.0 6 1

GroupAggregate (cost=0.23..182,769.04 rows=6 width=16) (actual time=165.083..343.634 rows=6 loops=1)

  • Group Key: sd.st_indicator_id
2. 11.045 338.384 ↓ 29.9 17,203 1

Nested Loop (cost=0.23..182,768.44 rows=576 width=16) (actual time=108.187..338.384 rows=17,203 loops=1)

3. 17.612 292.933 ↓ 9.3 17,203 1

Nested Loop (cost=0.20..182,701.26 rows=1,840 width=24) (actual time=108.179..292.933 rows=17,203 loops=1)

4. 223.712 223.712 ↓ 1.0 17,203 1

Index Scan using idx_stdetail_customer_id_st_indicator_id on st_detail sd (cost=0.11..172,639.87 rows=16,435 width=16) (actual time=108.150..223.712 rows=17,203 loops=1)

  • Index Cond: (customer_id = 245948)
  • Filter: ((created_at >= '2019-10-07 00:00:00'::timestamp without time zone) AND (created_at <= '2019-11-05 23:59:59'::timestamp without time zone))
  • Rows Removed by Filter: 531461
5. 51.609 51.609 ↑ 1.0 1 17,203

Index Scan using advice_pkey on advice a (cost=0.09..0.61 rows=1 width=16) (actual time=0.003..0.003 rows=1 loops=17,203)

  • Index Cond: (id = sd.advice_id)
  • Filter: ((deleted_at IS NULL) AND ((advice_state)::text = ANY ('{Published,Expired''Draft,Sold,Canceled}'::text[])))
6. 34.406 34.406 ↑ 1.0 1 17,203

Index Scan using advice_type_pkey on advice_type at (cost=0.03..0.03 rows=1 width=8) (actual time=0.001..0.002 rows=1 loops=17,203)

  • Index Cond: (id = a.advice_type_id)
  • Filter: (portal_configurator_id = 3)
Planning time : 4.294 ms
Execution time : 344.258 ms