explain.depesz.com

PostgreSQL's explain analyze made readable

Result: WvUa

Settings
# exclusive inclusive rows x rows loops node
1. 0.000 0.000 ↓ 0.0

Group (cost=0.84..24,044,808.10 rows=37,358 width=1,655) (actual rows= loops=)

  • Group Key: users.id
2. 0.000 0.000 ↓ 0.0

Nested Loop (cost=0.84..24,044,714.70 rows=37,358 width=1,655) (actual rows= loops=)

3. 0.000 0.000 ↓ 0.0

Index Scan using index_ad_args_on_user_id on ad_args (cost=0.42..9,165.23 rows=50,397 width=8) (actual rows= loops=)

  • Filter: (btag_net_refer IS NOT NULL)
4. 0.000 0.000 ↓ 0.0

Index Scan using users_pkey on users (cost=0.42..476.92 rows=1 width=1,655) (actual rows= loops=)

  • Index Cond: (id = ad_args.user_id)
  • Filter: ((NOT disabled) AND ((alternatives: SubPlan 1 or hashed SubPlan 2) OR (alternatives: SubPlan 3 or hashed SubPlan 4)))
5.          

SubPlan (forIndex Scan)

6. 0.000 0.000 ↓ 0.0

Nested Loop (cost=19.23..31.28 rows=1 width=0) (actual rows= loops=)

7. 0.000 0.000 ↓ 0.0

Index Scan using index_accounts_on_user_id_and_currency on accounts (cost=0.42..8.44 rows=1 width=8) (actual rows= loops=)

  • Index Cond: (user_id = users.id)
8. 0.000 0.000 ↓ 0.0

Bitmap Heap Scan on dense_balance_transactions (cost=18.81..22.83 rows=1 width=8) (actual rows= loops=)

  • Recheck Cond: ((account_id = accounts.id) AND (dense_created_at >= '2019-06-06 13:47:06.497573'::timestamp without time zone) AND (dense_created_at < '2019-06-07 13:47:06.497687'::timestamp without time zone))
9. 0.000 0.000 ↓ 0.0

BitmapAnd (cost=18.81..18.81 rows=1 width=0) (actual rows= loops=)

10. 0.000 0.000 ↓ 0.0

Bitmap Index Scan on index_dense_balance_transactions_on_account_id (cost=0.00..5.40 rows=129 width=0) (actual rows= loops=)

  • Index Cond: (account_id = accounts.id)
11. 0.000 0.000 ↓ 0.0

Bitmap Index Scan on index_dense_balance_transactions_on_dense_created_at (cost=0.00..13.05 rows=462 width=0) (actual rows= loops=)

  • Index Cond: ((dense_created_at >= '2019-06-06 13:47:06.497573'::timestamp without time zone) AND (dense_created_at < '2019-06-07 13:47:06.497687'::timestamp without time zone))
12. 0.000 0.000 ↓ 0.0

Nested Loop (cost=0.85..3,478.80 rows=462 width=8) (actual rows= loops=)

13. 0.000 0.000 ↓ 0.0

Index Scan using index_dense_balance_transactions_on_dense_created_at on dense_balance_transactions dense_balance_transactions_1 (cost=0.43..28.67 rows=462 width=8) (actual rows= loops=)

  • Index Cond: ((dense_created_at >= '2019-06-06 13:47:06.497573'::timestamp without time zone) AND (dense_created_at < '2019-06-07 13:47:06.497687'::timestamp without time zone))
14. 0.000 0.000 ↓ 0.0

Index Scan using accounts_pkey on accounts accounts_1 (cost=0.42..7.47 rows=1 width=16) (actual rows= loops=)

  • Index Cond: (id = dense_balance_transactions_1.account_id)
15. 0.000 0.000 ↓ 0.0

Nested Loop (cost=432.08..444.13 rows=1 width=0) (actual rows= loops=)

16. 0.000 0.000 ↓ 0.0

Index Scan using index_comp_point_accounts_on_user_id_and_account_type on comp_point_accounts (cost=0.42..8.44 rows=1 width=8) (actual rows= loops=)

  • Index Cond: (user_id = users.id)
17. 0.000 0.000 ↓ 0.0

Bitmap Heap Scan on comp_point_transactions (cost=431.66..435.68 rows=1 width=8) (actual rows= loops=)

  • Recheck Cond: ((created_at >= '2019-06-06 13:47:06.497573'::timestamp without time zone) AND (created_at < '2019-06-07 13:47:06.497687'::timestamp without time zone) AND (comp_point_account_id = comp_point_accounts.id))
18. 0.000 0.000 ↓ 0.0

BitmapAnd (cost=431.66..431.66 rows=1 width=0) (actual rows= loops=)

19. 0.000 0.000 ↓ 0.0

Bitmap Index Scan on index_comp_point_transactions_on_created_at (cost=0.00..193.03 rows=12,413 width=0) (actual rows= loops=)

  • Index Cond: ((created_at >= '2019-06-06 13:47:06.497573'::timestamp without time zone) AND (created_at < '2019-06-07 13:47:06.497687'::timestamp without time zone))
20. 0.000 0.000 ↓ 0.0

Bitmap Index Scan on index_comp_point_transactions_on_comp_point_account_id (cost=0.00..238.38 rows=10,908 width=0) (actual rows= loops=)

  • Index Cond: (comp_point_account_id = comp_point_accounts.id)
21. 0.000 0.000 ↓ 0.0

Nested Loop (cost=193.45..46,697.30 rows=1 width=8) (actual rows= loops=)

22. 0.000 0.000 ↓ 0.0

Bitmap Heap Scan on comp_point_transactions comp_point_transactions_1 (cost=193.03..46,688.87 rows=1 width=8) (actual rows= loops=)

  • Recheck Cond: ((created_at >= '2019-06-06 13:47:06.497573'::timestamp without time zone) AND (created_at < '2019-06-07 13:47:06.497687'::timestamp without time zone))
23. 0.000 0.000 ↓ 0.0

Bitmap Index Scan on index_comp_point_transactions_on_created_at (cost=0.00..193.03 rows=12,413 width=0) (actual rows= loops=)

  • Index Cond: ((created_at >= '2019-06-06 13:47:06.497573'::timestamp without time zone) AND (created_at < '2019-06-07 13:47:06.497687'::timestamp without time zone))
24. 0.000 0.000 ↓ 0.0

Index Scan using comp_point_accounts_pkey on comp_point_accounts comp_point_accounts_1 (cost=0.42..8.44 rows=1 width=16) (actual rows= loops=)

  • Index Cond: (id = comp_point_transactions_1.comp_point_account_id)