explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 5C5m

Settings
# exclusive inclusive rows x rows loops node
1. 0.000 6,325.519 ↑ 43.3 91 1

Sort (cost=25,511.47..25,521.31 rows=3,936 width=588) (actual time=6,325.499..6,325.519 rows=91 loops=1)

  • Sort Key: transactions_passive_p2020w33.created_date DESC
  • Sort Method: quicksort Memory: 77kB
  • OR (party_id = 'cfc7b972-396b-4d82-b9db-612310daecce'::uuid)))
  • OR (party_id = 'cfc7b972-396b-4d82-b9db-612310daecce'::uuid)))
  • OR (party_id = 'cfc7b972-396b-4d82-b9db-612310daecce'::uuid)))
2.          

Initplan (for Sort)

3. 0.011 6,253.738 ↓ 12.8 51 1

Limit (cost=17,121.00..17,121.01 rows=4 width=24) (actual time=6,253.723..6,253.738 rows=51 loops=1)

4. 0.092 6,253.727 ↓ 12.8 51 1

Sort (cost=17,121.00..17,121.01 rows=4 width=24) (actual time=6,253.718..6,253.727 rows=51 loops=1)

  • Sort Key: transactions_passive_p2020w33_1.created_date DESC
  • Sort Method: quicksort Memory: 29kB
5. 0.026 6,253.635 ↓ 15.2 61 1

Append (cost=56.80..17,120.96 rows=4 width=24) (actual time=4.639..6,253.635 rows=61 loops=1)

6. 6.034 8.892 ↓ 22.0 22 1

Bitmap Heap Scan on transactions_passive_p2020w33 transactions_passive_p2020w33_1 (cost=56.80..5,288.68 rows=1 width=24) (actual time=4.638..8.892 rows=22 loops=1)

  • Recheck Cond: ((wallet_id = 'c3d8fdf8-b4e6-4dd7-ac15-f5024230daa4'::uuid) OR (party_wallet_id = 'c3d8fdf8-b4e6-4dd7-ac15-f5024230daa4'::uuid))
  • Filter: ((created_date >= '2020-08-10 00:00:00'::timestamp without time zone) AND (created_date < '2020-08-26 16:49:53.67151'::timestamp without time zone) AND ((state)::text = ANY ('{PENDING,COMPLETED}'::text[])) AND ((state)::text <> 'DELETED'::text) AND ((pocket_id = 'cfc7b972-396b-4d82-b9db-612310daecce'::uuid)
  • Rows Removed by Filter: 14
  • Heap Blocks: exact=27
7. 0.012 2.858 ↓ 0.0 0 1

BitmapOr (cost=56.80..56.80 rows=3,688 width=0) (actual time=2.858..2.858 rows=0 loops=1)

8. 1.320 1.320 ↑ 67.6 24 1

Bitmap Index Scan on transactions_passive_p2020w33_wallet_id_idx (cost=0.00..25.33 rows=1,622 width=0) (actual time=1.320..1.320 rows=24 loops=1)

  • Index Cond: (wallet_id = 'c3d8fdf8-b4e6-4dd7-ac15-f5024230daa4'::uuid)
9. 1.526 1.526 ↑ 172.2 12 1

Bitmap Index Scan on transactions_passive_p2020w33_party_wallet_id_idx (cost=0.00..31.46 rows=2,066 width=0) (actual time=1.526..1.526 rows=12 loops=1)

  • Index Cond: (party_wallet_id = 'c3d8fdf8-b4e6-4dd7-ac15-f5024230daa4'::uuid)
10. 5.997 8.692 ↓ 31.0 31 1

Bitmap Heap Scan on transactions_passive_p2020w34 transactions_passive_p2020w34_1 (cost=56.40..5,213.36 rows=1 width=24) (actual time=3.792..8.692 rows=31 loops=1)

  • Recheck Cond: ((wallet_id = 'c3d8fdf8-b4e6-4dd7-ac15-f5024230daa4'::uuid) OR (party_wallet_id = 'c3d8fdf8-b4e6-4dd7-ac15-f5024230daa4'::uuid))
  • Filter: ((created_date >= '2020-08-10 00:00:00'::timestamp without time zone) AND (created_date < '2020-08-26 16:49:53.67151'::timestamp without time zone) AND ((state)::text = ANY ('{PENDING,COMPLETED}'::text[])) AND ((state)::text <> 'DELETED'::text) AND ((pocket_id = 'cfc7b972-396b-4d82-b9db-612310daecce'::uuid)
  • Rows Removed by Filter: 10
  • Heap Blocks: exact=30
11. 0.002 2.695 ↓ 0.0 0 1

BitmapOr (cost=56.40..56.40 rows=3,635 width=0) (actual time=2.695..2.695 rows=0 loops=1)

12. 1.426 1.426 ↑ 69.9 23 1

Bitmap Index Scan on transactions_passive_p2020w34_wallet_id_idx (cost=0.00..25.23 rows=1,608 width=0) (actual time=1.426..1.426 rows=23 loops=1)

  • Index Cond: (wallet_id = 'c3d8fdf8-b4e6-4dd7-ac15-f5024230daa4'::uuid)
13. 1.267 1.267 ↑ 112.6 18 1

Bitmap Index Scan on transactions_passive_p2020w34_party_wallet_id_idx (cost=0.00..31.17 rows=2,027 width=0) (actual time=1.267..1.267 rows=18 loops=1)

  • Index Cond: (party_wallet_id = 'c3d8fdf8-b4e6-4dd7-ac15-f5024230daa4'::uuid)
14. 5.043 7.580 ↓ 8.0 8 1

Bitmap Heap Scan on transactions_passive_p2020w35 transactions_passive_p2020w35_1 (cost=59.61..5,559.61 rows=1 width=24) (actual time=3.669..7.580 rows=8 loops=1)

  • Recheck Cond: ((wallet_id = 'c3d8fdf8-b4e6-4dd7-ac15-f5024230daa4'::uuid) OR (party_wallet_id = 'c3d8fdf8-b4e6-4dd7-ac15-f5024230daa4'::uuid))
  • Filter: ((created_date >= '2020-08-10 00:00:00'::timestamp without time zone) AND (created_date < '2020-08-26 16:49:53.67151'::timestamp without time zone) AND ((state)::text = ANY ('{PENDING,COMPLETED}'::text[])) AND ((state)::text <> 'DELETED'::text) AND ((pocket_id = 'cfc7b972-396b-4d82-b9db-612310daecce'::uuid)
  • Rows Removed by Filter: 16
  • Heap Blocks: exact=19
15. 0.002 2.537 ↓ 0.0 0 1

BitmapOr (cost=59.61..59.61 rows=3,877 width=0) (actual time=2.537..2.537 rows=0 loops=1)

16. 1.225 1.225 ↑ 122.7 14 1

Bitmap Index Scan on transactions_passive_p2020w35_wallet_id_idx (cost=0.00..26.05 rows=1,718 width=0) (actual time=1.224..1.225 rows=14 loops=1)

  • Index Cond: (wallet_id = 'c3d8fdf8-b4e6-4dd7-ac15-f5024230daa4'::uuid)
17. 1.310 1.310 ↑ 215.8 10 1

Bitmap Index Scan on transactions_passive_p2020w35_party_wallet_id_idx (cost=0.00..33.55 rows=2,158 width=0) (actual time=1.310..1.310 rows=10 loops=1)

  • Index Cond: (party_wallet_id = 'c3d8fdf8-b4e6-4dd7-ac15-f5024230daa4'::uuid)
18. 0.004 6,228.445 ↓ 0.0 0 1

Bitmap Heap Scan on transactions_active_current transactions_active_current_1 (cost=1,057.87..1,059.30 rows=1 width=24) (actual time=6,228.445..6,228.445 rows=0 loops=1)

  • Recheck Cond: (((wallet_id = 'c3d8fdf8-b4e6-4dd7-ac15-f5024230daa4'::uuid) OR (party_wallet_id = 'c3d8fdf8-b4e6-4dd7-ac15-f5024230daa4'::uuid)) AND (created_date >= '2020-08-10 00:00:00'::timestamp without time zone) AND (created_date < '2020-08-26 16:49:53.67151'::timestamp without time zone))
  • Filter: (((state)::text = ANY ('{PENDING,COMPLETED}'::text[])) AND ((state)::text <> 'DELETED'::text) AND ((pocket_id = 'cfc7b972-396b-4d82-b9db-612310daecce'::uuid) OR (party_id = 'cfc7b972-396b-4d82-b9db-612310daecce'::uuid)))
19. 0.261 6,228.441 ↓ 0.0 0 1

BitmapAnd (cost=1,057.87..1,057.87 rows=1 width=0) (actual time=6,228.441..6,228.441 rows=0 loops=1)

20. 0.002 1.434 ↓ 0.0 0 1

BitmapOr (cost=19.89..19.89 rows=1,009 width=0) (actual time=1.434..1.434 rows=0 loops=1)

21. 0.129 0.129 ↑ 62.7 6 1

Bitmap Index Scan on transactions_active_current_wallet_id_idx (cost=0.00..7.58 rows=376 width=0) (actual time=0.129..0.129 rows=6 loops=1)

  • Index Cond: (wallet_id = 'c3d8fdf8-b4e6-4dd7-ac15-f5024230daa4'::uuid)
22. 1.303 1.303 ↓ 0.0 0 1

Bitmap Index Scan on transactions_active_current_party_wallet_id_idx (cost=0.00..12.31 rows=633 width=0) (actual time=1.303..1.303 rows=0 loops=1)

  • Index Cond: (party_wallet_id = 'c3d8fdf8-b4e6-4dd7-ac15-f5024230daa4'::uuid)
23. 6,226.746 6,226.746 ↓ 1.1 30,168 1

Bitmap Index Scan on transactions_active_current_created_date_idx (cost=0.00..1,037.72 rows=28,536 width=0) (actual time=6,226.746..6,226.746 rows=30,168 loops=1)

  • Index Cond: ((created_date >= '2020-08-10 00:00:00'::timestamp without time zone) AND (created_date < '2020-08-26 16:49:53.67151'::timestamp without time zone))
24. 0.039 6,325.226 ↑ 43.3 91 1

Append (cost=0.57..8,155.42 rows=3,936 width=588) (actual time=6,257.318..6,325.226 rows=91 loops=1)

25. 6,272.046 6,272.046 ↑ 74.6 23 1

Index Scan using transactions_passive_p2020w33_group_id_idx on transactions_passive_p2020w33 (cost=0.57..2,460.45 rows=1,716 width=591) (actual time=6,257.316..6,272.046 rows=23 loops=1)

  • Index Cond: (group_id = ANY ($0))
  • Filter: ((created_date >= '2020-08-10 00:00:00'::timestamp without time zone) AND (created_date <= '2020-08-26 16:49:53.67151'::timestamp without time zone))
26. 24.627 24.627 ↑ 29.3 54 1

Index Scan using transactions_passive_p2020w34_group_id_idx on transactions_passive_p2020w34 (cost=0.57..2,270.05 rows=1,582 width=585) (actual time=0.090..24.627 rows=54 loops=1)

  • Index Cond: (group_id = ANY ($0))
  • Filter: ((created_date >= '2020-08-10 00:00:00'::timestamp without time zone) AND (created_date <= '2020-08-26 16:49:53.67151'::timestamp without time zone))
27. 22.496 22.496 ↑ 45.5 14 1

Index Scan using transactions_passive_p2020w35_group_id_idx on transactions_passive_p2020w35 (cost=0.57..2,335.44 rows=637 width=586) (actual time=1.024..22.496 rows=14 loops=1)

  • Index Cond: (group_id = ANY ($0))
  • Filter: ((created_date >= '2020-08-10 00:00:00'::timestamp without time zone) AND (created_date <= '2020-08-26 16:49:53.67151'::timestamp without time zone))
28. 0.010 6.018 ↓ 0.0 0 1

Bitmap Heap Scan on transactions_active_current (cost=1,068.38..1,069.81 rows=1 width=626) (actual time=6.018..6.018 rows=0 loops=1)

  • Recheck Cond: ((group_id = ANY ($0)) AND (created_date >= '2020-08-10 00:00:00'::timestamp without time zone) AND (created_date <= '2020-08-26 16:49:53.67151'::timestamp without time zone))
29. 0.001 6.008 ↓ 0.0 0 1

BitmapAnd (cost=1,068.38..1,068.38 rows=1 width=0) (actual time=6.008..6.008 rows=0 loops=1)

30. 6.007 6.007 ↓ 0.0 0 1

Bitmap Index Scan on transactions_active_current_group_id_idx (cost=0.00..26.52 rows=923 width=0) (actual time=6.007..6.007 rows=0 loops=1)

  • Index Cond: (group_id = ANY ($0))
31. 0.000 0.000 ↓ 0.0 0

Bitmap Index Scan on transactions_active_current_created_date_idx (cost=0.00..1,041.60 rows=28,644 width=0) (never executed)

  • Index Cond: ((created_date >= '2020-08-10 00:00:00'::timestamp without time zone) AND (created_date <= '2020-08-26 16:49:53.67151'::timestamp without time zone))
Planning time : 19.882 ms
Execution time : 6,326.466 ms