explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 7mzn

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

Nested Loop Anti Join (cost=2.69..602.33 rows=1 width=80) (actual time=0.053..0.053 rows=0 loops=1)

  • Join Filter: (batch.bid = b.bid)
  • Buffers: shared hit=17
2. 0.001 0.045 ↑ 1.0 1 1

Nested Loop Anti Join (cost=2.14..591.25 rows=1 width=80) (actual time=0.044..0.045 rows=1 loops=1)

  • Buffers: shared hit=12
3. 0.001 0.037 ↑ 1.0 1 1

Nested Loop Anti Join (cost=1.70..586.61 rows=1 width=80) (actual time=0.037..0.037 rows=1 loops=1)

  • Join Filter: ((ae.bid)::text = batch.bid)
  • Buffers: shared hit=9
4. 0.019 0.019 ↑ 1.0 1 1

Index Scan using batch_bid_reference_date_commercial_condition_id_key on batch (cost=0.56..4.72 rows=1 width=80) (actual time=0.018..0.019 rows=1 loops=1)

  • Index Cond: ((bid = '169855'::text) AND (reference_date >= '2019-08-05'::date) AND (reference_date <= '2019-08-11'::date) AND ((commercial_condition_id)::text = 'UNKNOWN'::text))
  • Buffers: shared hit=5
5. 0.000 0.017 ↓ 0.0 0 1

Nested Loop Anti Join (cost=1.15..581.69 rows=95 width=6) (actual time=0.017..0.017 rows=0 loops=1)

  • Buffers: shared hit=4
6. 0.017 0.017 ↓ 0.0 0 1

Index Scan using account_entry_bid_transaction_datetime_local_report_idx on account_entry ae (cost=0.57..252.55 rows=114 width=14) (actual time=0.017..0.017 rows=0 loops=1)

  • Index Cond: (((bid)::text = '169855'::text) AND ((transaction_datetime_local)::date >= '2019-08-05'::date) AND ((transaction_datetime_local)::date <= '2019-08-11'::date))
  • Filter: (((description)::text <> ALL ('{PAYOUT,CARREGAMENTO}'::text[])) AND ((status)::text = 'OPEN'::text))
  • Buffers: shared hit=4
7. 0.000 0.000 ↓ 0.0 0

Index Only Scan using account_entry_batch_pkey on rel_account_entry_batch r (cost=0.57..2.87 rows=1 width=8) (never executed)

  • Index Cond: (account_entry_id = ae.id)
  • Heap Fetches: 0
8. 0.007 0.007 ↓ 0.0 0 1

Index Only Scan using rel_aggregated_batches_batch_batch_id on rel_aggregated_batches_batch (cost=0.43..4.54 rows=1 width=8) (actual time=0.007..0.007 rows=0 loops=1)

  • Index Cond: (batch_id = batch.id)
  • Heap Fetches: 0
  • Buffers: shared hit=3
9. 0.007 0.007 ↑ 1.0 1 1

Index Scan using batch_bid_reference_date_commercial_condition_id_key on batch b (cost=0.56..10.98 rows=1 width=6) (actual time=0.007..0.007 rows=1 loops=1)

  • Index Cond: ((bid = '169855'::text) AND (reference_date >= '2019-08-05'::date) AND (reference_date <= '2019-08-11'::date))
  • Filter: (NOT closed)
  • Buffers: shared hit=5
Planning time : 0.817 ms
Execution time : 0.094 ms