explain.depesz.com

PostgreSQL's explain analyze made readable

Result: e8Ek

Settings
# exclusive inclusive rows x rows loops node
1. 0.002 7,344.856 ↓ 2.0 4 1

Unique (cost=12,842.11..12,842.12 rows=2 width=8) (actual time=7,344.855..7,344.856 rows=4 loops=1)

2. 0.017 7,344.854 ↓ 3.0 6 1

Sort (cost=12,842.11..12,842.12 rows=2 width=8) (actual time=7,344.854..7,344.854 rows=6 loops=1)

  • Sort Key: tn.written_off_nomenclature_id
  • Sort Method: quicksort Memory: 25kB
3. 0.003 7,344.837 ↓ 3.0 6 1

Append (cost=6,421.03..12,842.10 rows=2 width=8) (actual time=7,010.194..7,344.837 rows=6 loops=1)

4. 1.444 7,010.194 ↓ 3.0 3 1

HashAggregate (cost=6,421.03..6,421.04 rows=1 width=8) (actual time=7,010.193..7,010.194 rows=3 loops=1)

  • Group Key: tn.written_off_nomenclature_id
5. 5.177 7,008.750 ↓ 72.5 2,392 1

Nested Loop (cost=6,078.51..6,420.95 rows=33 width=8) (actual time=6,769.292..7,008.750 rows=2,392 loops=1)

6. 188.505 6,955.733 ↓ 72.5 2,392 1

Bitmap Heap Scan on transactions_new tn (cost=6,078.09..6,210.10 rows=33 width=19) (actual time=6,767.662..6,955.733 rows=2,392 loops=1)

  • Recheck Cond: (((client_id)::text = 'КЭМКТ03670'::text) AND (transaction_date >= '2019-01-01'::date) AND (transaction_date <= '2019-11-28'::date))
  • Rows Removed by Index Recheck: 102
  • Heap Blocks: exact=2433
7. 1.323 6,767.228 ↓ 0.0 0 1

BitmapAnd (cost=6,078.09..6,078.09 rows=33 width=0) (actual time=6,767.228..6,767.228 rows=0 loops=1)

8. 175.290 175.290 ↓ 1.9 6,277 1

Bitmap Index Scan on transactions_new_client_id_contract_number_idx (cost=0.00..157.86 rows=3,373 width=0) (actual time=175.290..175.290 rows=6,277 loops=1)

  • Index Cond: ((client_id)::text = 'КЭМКТ03670'::text)
9. 6,590.615 6,590.615 ↓ 6.8 1,637,190 1

Bitmap Index Scan on transactions_new_transaction_date_idx (cost=0.00..5,919.97 rows=240,353 width=0) (actual time=6,590.615..6,590.615 rows=1,637,190 loops=1)

  • Index Cond: ((transaction_date >= '2019-01-01'::date) AND (transaction_date <= '2019-11-28'::date))
10. 47.840 47.840 ↑ 1.0 1 2,392

Index Only Scan using cards_card_number_idx on cards cs (cost=0.42..6.38 rows=1 width=11) (actual time=0.020..0.020 rows=1 loops=2,392)

  • Index Cond: (card_number = (tn.entity_number)::text)
  • Heap Fetches: 2392
11. 0.876 334.640 ↓ 3.0 3 1

HashAggregate (cost=6,421.03..6,421.04 rows=1 width=8) (actual time=334.640..334.640 rows=3 loops=1)

  • Group Key: tn_1.poured_nomenclature_id
12. 1.538 333.764 ↓ 72.5 2,392 1

Nested Loop (cost=6,078.51..6,420.95 rows=33 width=8) (actual time=306.329..333.764 rows=2,392 loops=1)

13. 4.805 310.698 ↓ 72.5 2,392 1

Bitmap Heap Scan on transactions_new tn_1 (cost=6,078.09..6,210.10 rows=33 width=19) (actual time=306.293..310.698 rows=2,392 loops=1)

  • Recheck Cond: (((client_id)::text = 'КЭМКТ03670'::text) AND (transaction_date >= '2019-01-01'::date) AND (transaction_date <= '2019-11-28'::date))
  • Rows Removed by Index Recheck: 102
  • Heap Blocks: exact=2433
14. 1.267 305.893 ↓ 0.0 0 1

BitmapAnd (cost=6,078.09..6,078.09 rows=33 width=0) (actual time=305.893..305.893 rows=0 loops=1)

15. 1.136 1.136 ↓ 1.9 6,277 1

Bitmap Index Scan on transactions_new_client_id_contract_number_idx (cost=0.00..157.86 rows=3,373 width=0) (actual time=1.136..1.136 rows=6,277 loops=1)

  • Index Cond: ((client_id)::text = 'КЭМКТ03670'::text)
16. 303.490 303.490 ↓ 6.8 1,637,188 1

Bitmap Index Scan on transactions_new_transaction_date_idx (cost=0.00..5,919.97 rows=240,353 width=0) (actual time=303.490..303.490 rows=1,637,188 loops=1)

  • Index Cond: ((transaction_date >= '2019-01-01'::date) AND (transaction_date <= '2019-11-28'::date))
17. 21.528 21.528 ↑ 1.0 1 2,392

Index Only Scan using cards_card_number_idx on cards cs_1 (cost=0.42..6.38 rows=1 width=11) (actual time=0.009..0.009 rows=1 loops=2,392)

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