explain.depesz.com

PostgreSQL's explain analyze made readable

Result: GXxg

Settings
# exclusive inclusive rows x rows loops node
1. 0.006 44.419 ↓ 2.0 4 1

Unique (cost=5,182.79..5,182.80 rows=2 width=8) (actual time=44.415..44.419 rows=4 loops=1)

2. 0.037 44.413 ↓ 3.0 6 1

Sort (cost=5,182.79..5,182.79 rows=2 width=8) (actual time=44.413..44.413 rows=6 loops=1)

  • Sort Key: tn.written_off_nomenclature_id
  • Sort Method: quicksort Memory: 25kB
3. 0.004 44.376 ↓ 3.0 6 1

Append (cost=2,591.37..5,182.78 rows=2 width=8) (actual time=24.343..44.376 rows=6 loops=1)

4. 0.974 24.343 ↓ 3.0 3 1

HashAggregate (cost=2,591.37..2,591.38 rows=1 width=8) (actual time=24.343..24.343 rows=3 loops=1)

  • Group Key: tn.written_off_nomenclature_id
5. 3.481 23.369 ↓ 10.6 2,385 1

Nested Loop (cost=0.98..2,590.81 rows=225 width=8) (actual time=0.296..23.369 rows=2,385 loops=1)

6. 3.193 3.193 ↓ 10.6 2,385 1

Index Scan using transactions_new_client_id_transaction_date_idx on transactions_new tn (cost=0.56..877.56 rows=225 width=19) (actual time=0.242..3.193 rows=2,385 loops=1)

  • Index Cond: (((client_id)::text = 'КЭМКТ03670'::text) AND (transaction_date >= '2019-01-01'::date) AND (transaction_date <= '2019-11-28'::date))
7. 16.695 16.695 ↑ 1.0 1 2,385

Index Only Scan using cards_card_number_idx on cards cs (cost=0.42..7.60 rows=1 width=11) (actual time=0.007..0.007 rows=1 loops=2,385)

  • Index Cond: (card_number = (tn.entity_number)::text)
  • Heap Fetches: 2385
8. 0.705 20.029 ↓ 3.0 3 1

HashAggregate (cost=2,591.37..2,591.38 rows=1 width=8) (actual time=20.028..20.029 rows=3 loops=1)

  • Group Key: tn_1.poured_nomenclature_id
9. 2.577 19.324 ↓ 10.6 2,385 1

Nested Loop (cost=0.98..2,590.81 rows=225 width=8) (actual time=0.071..19.324 rows=2,385 loops=1)

10. 2.437 2.437 ↓ 10.6 2,385 1

Index Scan using transactions_new_client_id_transaction_date_idx on transactions_new tn_1 (cost=0.56..877.56 rows=225 width=19) (actual time=0.045..2.437 rows=2,385 loops=1)

  • Index Cond: (((client_id)::text = 'КЭМКТ03670'::text) AND (transaction_date >= '2019-01-01'::date) AND (transaction_date <= '2019-11-28'::date))
11. 14.310 14.310 ↑ 1.0 1 2,385

Index Only Scan using cards_card_number_idx on cards cs_1 (cost=0.42..7.60 rows=1 width=11) (actual time=0.006..0.006 rows=1 loops=2,385)

  • Index Cond: (card_number = (tn_1.entity_number)::text)
  • Heap Fetches: 2385
Planning time : 4.121 ms