explain.depesz.com

PostgreSQL's explain analyze made readable

Result: LS9Y

Settings
# exclusive inclusive rows x rows loops node
1. 0.001 213.736 ↓ 0.0 0 1

GroupAggregate (cost=5,576.10..5,576.14 rows=1 width=39) (actual time=213.736..213.736 rows=0 loops=1)

  • Group Key: items.invoice_description, details.att_value, items.sr_vat_type, vat.vat_percentage
  • Filter: ((sum(items.sr_amount) > 0::numeric) OR (sum(items.sr_amount) < 0::numeric))
2. 0.030 213.735 ↓ 0.0 0 1

Sort (cost=5,576.10..5,576.10 rows=1 width=39) (actual time=213.735..213.735 rows=0 loops=1)

  • Sort Key: items.invoice_description, details.att_value, items.sr_vat_type, vat.vat_percentage
  • Sort Method: quicksort Memory: 25kB
3. 0.000 213.705 ↓ 0.0 0 1

Nested Loop (cost=1.29..5,576.09 rows=1 width=39) (actual time=213.705..213.705 rows=0 loops=1)

  • Join Filter: ((items.sr_vat_type)::text = (vat.code)::text)
4. 0.001 213.705 ↓ 0.0 0 1

Nested Loop (cost=1.29..5,574.91 rows=1 width=31) (actual time=213.705..213.705 rows=0 loops=1)

5. 0.001 213.704 ↓ 0.0 0 1

Nested Loop (cost=1.01..5,572.40 rows=1 width=39) (actual time=213.704..213.704 rows=0 loops=1)

6. 213.703 213.703 ↓ 0.0 0 1

Index Scan using stt_obs_statement_item_detail_final_att_value_idx on stt_obs_statement_item_detail details (cost=0.57..4,317.03 rows=471 width=17) (actual time=213.703..213.703 rows=0 loops=1)

  • Index Cond: ((att_value)::text = 'Milan'::text)
  • Filter: ((att_name)::text = 'city'::text)
7. 0.000 0.000 ↓ 0.0 0

Index Scan using stt_obs_statement_items_pkey on stt_obs_statement_items items (cost=0.43..2.66 rows=1 width=38) (never executed)

  • Index Cond: (id = details.obs_statement_item_id)
  • Filter: (((status)::text <> 'Canceled'::text) AND (statement_id = 177,593,827))
8. 0.000 0.000 ↓ 0.0 0

Index Only Scan using stt_ibs_obs_statement_pkey on stt_ibs_obs_statement statement (cost=0.28..2.50 rows=1 width=8) (never executed)

  • Index Cond: (id = 177,593,827)
  • Heap Fetches: 0
9. 0.000 0.000 ↓ 0.0 0

Seq Scan on act_vat_setup vat (cost=0.00..1.08 rows=8 width=11) (never executed)

Planning time : 1.593 ms
Execution time : 213.907 ms