explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 3Lsx

Settings
# exclusive inclusive rows x rows loops node
1. 0.042 23.194 ↑ 1.0 41 1

Limit (cost=1.58..102.02 rows=41 width=7,009) (actual time=19.554..23.194 rows=41 loops=1)

2. 0.145 23.152 ↑ 22,589.1 41 1

Nested Loop (cost=1.58..2,268,658.40 rows=926,152 width=7,009) (actual time=19.552..23.152 rows=41 loops=1)

  • Join Filter: (t2.account_type_id = t3.id)
  • Rows Removed by Join Filter: 123
3. 0.120 22.966 ↑ 22,589.1 41 1

Nested Loop (cost=1.58..2,221,423.60 rows=926,152 width=7,017) (actual time=19.537..22.966 rows=41 loops=1)

  • Join Filter: (t6.user_group_id = t7.id)
  • Rows Removed by Join Filter: 82
4. 0.149 22.805 ↑ 22,589.1 41 1

Nested Loop (cost=1.58..2,147,991.60 rows=926,152 width=7,025) (actual time=19.522..22.805 rows=41 loops=1)

  • Join Filter: (t8.account_type_id = t9.id)
  • Rows Removed by Join Filter: 123
5. 0.153 22.615 ↑ 22,589.1 41 1

Nested Loop (cost=1.58..2,100,756.80 rows=926,152 width=7,033) (actual time=19.505..22.615 rows=41 loops=1)

  • Join Filter: (t10.user_group_id = t11.id)
  • Rows Removed by Join Filter: 82
6. 0.212 22.421 ↑ 22,589.1 41 1

Nested Loop (cost=1.58..2,027,324.80 rows=926,152 width=7,041) (actual time=19.480..22.421 rows=41 loops=1)

  • Join Filter: ((t1.from_id = ANY ('{1,2,3}'::bigint[])) OR (t1.to_id = ANY ('{1,2,3}'::bigint[])) OR ((t6.user_group_id = ANY ('{4,5,7}'::bigint[])) AND (t2.account_type_id = '4'::bigint)) OR ((t10.user_group_id = ANY ('{4,5,7}'::bigint[])) AND (t8.account_type_id = '4'::bigint)))
7. 0.142 21.881 ↑ 22,589.1 41 1

Nested Loop (cost=1.29..1,433,478.37 rows=926,152 width=7,041) (actual time=19.459..21.881 rows=41 loops=1)

8. 0.153 21.411 ↑ 22,589.1 41 1

Nested Loop (cost=1.00..1,131,295.37 rows=926,152 width=7,025) (actual time=19.442..21.411 rows=41 loops=1)

9. 0.152 20.930 ↑ 22,589.1 41 1

Nested Loop (cost=0.71..565,232.66 rows=926,152 width=7,025) (actual time=19.423..20.930 rows=41 loops=1)

10. 0.146 20.327 ↑ 22,589.1 41 1

Nested Loop (cost=0.42..258,419.03 rows=926,152 width=7,009) (actual time=19.391..20.327 rows=41 loops=1)

  • Join Filter: (t0.from_account_type_id = t4.id)
  • Rows Removed by Join Filter: 123
11. 0.476 20.099 ↑ 22,589.1 41 1

Nested Loop (cost=0.42..202,847.80 rows=926,152 width=7,017) (actual time=19.354..20.099 rows=41 loops=1)

  • Join Filter: (t1.type_id = t0.id)
  • Rows Removed by Join Filter: 41
12. 19.582 19.582 ↑ 22,589.1 41 1

Index Scan Backward using ix_transactions_date on transactions t1 (cost=0.42..75,290.26 rows=926,152 width=7,009) (actual time=19.303..19.582 rows=41 loops=1)

  • Filter: (((authorization_status)::text = ANY ('{NA,AUTHORIZED}'::text[])) AND ((subclass)::text = ANY ('{PAYMENT,ORDER_PAYMENT,IMPORT,CHARGEBACK}'::text[])))
13. 0.010 0.041 ↑ 5.0 2 41

Materialize (cost=0.00..1.15 rows=10 width=16) (actual time=0.001..0.001 rows=2 loops=41)

14. 0.031 0.031 ↑ 5.0 2 1

Seq Scan on transfer_types t0 (cost=0.00..1.10 rows=10 width=16) (actual time=0.029..0.031 rows=2 loops=1)

15. 0.052 0.082 ↑ 1.0 4 41

Materialize (cost=0.00..2.12 rows=4 width=8) (actual time=0.001..0.002 rows=4 loops=41)

16. 0.008 0.030 ↑ 1.0 4 1

Nested Loop (cost=0.00..2.10 rows=4 width=8) (actual time=0.023..0.030 rows=4 loops=1)

  • Join Filter: (t4.currency_id = t5.id)
17. 0.012 0.012 ↑ 1.0 1 1

Seq Scan on currencies t5 (cost=0.00..1.01 rows=1 width=8) (actual time=0.010..0.012 rows=1 loops=1)

  • Filter: (network_id = '1'::bigint)
18. 0.010 0.010 ↑ 1.0 4 1

Seq Scan on account_types t4 (cost=0.00..1.04 rows=4 width=16) (actual time=0.008..0.010 rows=4 loops=1)

19. 0.451 0.451 ↑ 1.0 1 41

Index Scan using accounts_pkey on accounts t2 (cost=0.29..0.32 rows=1 width=24) (actual time=0.011..0.011 rows=1 loops=41)

  • Index Cond: (id = t1.from_id)
  • Filter: (((user_id = '1'::bigint) OR ((t1.authorization_type)::text <> 'OPERATOR'::text)) AND (((t1.subclass)::text <> 'TICKET'::text) OR (user_id IS NULL) OR (user_id <> '1'::bigint)))
20. 0.328 0.328 ↑ 1.0 1 41

Index Scan using users_pkey on users t6 (cost=0.29..0.61 rows=1 width=16) (actual time=0.008..0.008 rows=1 loops=41)

  • Index Cond: (id = t2.user_id)
21. 0.328 0.328 ↑ 1.0 1 41

Index Scan using accounts_pkey on accounts t8 (cost=0.29..0.32 rows=1 width=24) (actual time=0.008..0.008 rows=1 loops=41)

  • Index Cond: (id = t1.to_id)
  • Filter: (((t1.subclass)::text <> 'SCHEDULED_PAYMENT'::text) OR (user_id <> '1'::bigint) OR t1.show_to_receiver)
22. 0.328 0.328 ↑ 1.0 1 41

Index Scan using users_pkey on users t10 (cost=0.29..0.61 rows=1 width=16) (actual time=0.008..0.008 rows=1 loops=41)

  • Index Cond: (id = t8.user_id)
23. 0.025 0.041 ↑ 2.0 3 41

Materialize (cost=0.00..1.09 rows=6 width=8) (actual time=0.001..0.001 rows=3 loops=41)

24. 0.016 0.016 ↑ 2.0 3 1

Seq Scan on groups t11 (cost=0.00..1.06 rows=6 width=8) (actual time=0.014..0.016 rows=3 loops=1)

25. 0.033 0.041 ↑ 1.0 4 41

Materialize (cost=0.00..1.06 rows=4 width=8) (actual time=0.000..0.001 rows=4 loops=41)

26. 0.008 0.008 ↑ 1.0 4 1

Seq Scan on account_types t9 (cost=0.00..1.04 rows=4 width=8) (actual time=0.007..0.008 rows=4 loops=1)

27. 0.034 0.041 ↑ 2.0 3 41

Materialize (cost=0.00..1.09 rows=6 width=8) (actual time=0.000..0.001 rows=3 loops=41)

28. 0.007 0.007 ↑ 2.0 3 1

Seq Scan on groups t7 (cost=0.00..1.06 rows=6 width=8) (actual time=0.006..0.007 rows=3 loops=1)

29. 0.033 0.041 ↑ 1.0 4 41

Materialize (cost=0.00..1.06 rows=4 width=8) (actual time=0.000..0.001 rows=4 loops=41)

30. 0.008 0.008 ↑ 1.0 4 1

Seq Scan on account_types t3 (cost=0.00..1.04 rows=4 width=8) (actual time=0.006..0.008 rows=4 loops=1)

Planning time : 17.344 ms
Execution time : 23.338 ms