explain.depesz.com

PostgreSQL's explain analyze made readable

Result: SOMi

Settings
# exclusive inclusive rows x rows loops node
1. 0.003 9,121.642 ↓ 2.0 4 1

Unique (cost=31,046.35..31,046.36 rows=2 width=8) (actual time=9,121.639..9,121.642 rows=4 loops=1)

2. 0.098 9,121.639 ↓ 3.0 6 1

Sort (cost=31,046.35..31,046.35 rows=2 width=8) (actual time=9,121.638..9,121.639 rows=6 loops=1)

  • Sort Key: tn.written_off_nomenclature_id
  • Sort Method: quicksort Memory: 25kB
3. 0.002 9,121.541 ↓ 3.0 6 1

Append (cost=15,523.15..31,046.34 rows=2 width=8) (actual time=9,097.511..9,121.541 rows=6 loops=1)

4. 10.558 9,097.513 ↓ 3.0 3 1

HashAggregate (cost=15,523.15..15,523.16 rows=1 width=8) (actual time=9,097.510..9,097.513 rows=3 loops=1)

  • Group Key: tn.written_off_nomenclature_id
5. 37.191 9,086.955 ↓ 10.6 2,385 1

Nested Loop (cost=0.98..15,522.59 rows=225 width=8) (actual time=2,854.507..9,086.955 rows=2,385 loops=1)

6. 8,813.649 8,813.649 ↓ 10.6 2,385 1

Index Scan using transactions_new_client_id_contract_number_idx on transactions_new tn (cost=0.56..13,809.34 rows=225 width=19) (actual time=2,831.136..8,813.649 rows=2,385 loops=1)

  • Index Cond: ((client_id)::text = 'КЭМКТ03670'::text)
  • Filter: ((transaction_date >= '2019-01-01'::date) AND (transaction_date <= '2019-11-28'::date))
  • Rows Removed by Filter: 1034
7. 236.115 236.115 ↑ 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.098..0.099 rows=1 loops=2,385)

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

HashAggregate (cost=15,523.15..15,523.16 rows=1 width=8) (actual time=24.024..24.026 rows=3 loops=1)

  • Group Key: tn_1.poured_nomenclature_id
9. 1.460 23.119 ↓ 10.6 2,385 1

Nested Loop (cost=0.98..15,522.59 rows=225 width=8) (actual time=1.909..23.119 rows=2,385 loops=1)

10. 4.964 4.964 ↓ 10.6 2,385 1

Index Scan using transactions_new_client_id_contract_number_idx on transactions_new tn_1 (cost=0.56..13,809.34 rows=225 width=19) (actual time=1.848..4.964 rows=2,385 loops=1)

  • Index Cond: ((client_id)::text = 'КЭМКТ03670'::text)
  • Filter: ((transaction_date >= '2019-01-01'::date) AND (transaction_date <= '2019-11-28'::date))
  • Rows Removed by Filter: 1034
11. 16.695 16.695 ↑ 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.007 rows=1 loops=2,385)

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