explain.depesz.com

PostgreSQL's explain analyze made readable

Result: biuy

Settings
# exclusive inclusive rows x rows loops node
1. 0.742 7,240.306 ↓ 4.9 690 1

Nested Loop (cost=50,302.86..53,665.41 rows=142 width=1,975) (actual time=7,187.088..7,240.306 rows=690 loops=1)

2. 0.021 7,236.094 ↓ 4.8 694 1

Nested Loop (cost=50,302.44..53,446.68 rows=144 width=16) (actual time=7,187.075..7,236.094 rows=694 loops=1)

3. 303.374 7,187.473 ↓ 2.6 1,215 1

HashAggregate (cost=50,302.02..50,306.74 rows=472 width=8) (actual time=7,187.049..7,187.473 rows=1,215 loops=1)

  • Group Key: accounts.user_id
4. 110.200 6,884.099 ↓ 2,437.5 1,150,520 1

Append (cost=0.85..50,300.84 rows=472 width=8) (actual time=0.317..6,884.099 rows=1,150,520 loops=1)

5. 6.655 160.944 ↓ 35.1 16,518 1

Nested Loop (cost=0.85..3,546.91 rows=471 width=8) (actual time=0.317..160.944 rows=16,518 loops=1)

6. 5.627 5.627 ↓ 35.1 16,518 1

Index Scan using index_dense_balance_transactions_on_dense_created_at on dense_balance_transactions (cost=0.43..28.85 rows=471 width=8) (actual time=0.012..5.627 rows=16,518 loops=1)

  • 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))
7. 148.662 148.662 ↑ 1.0 1 16,518

Index Scan using accounts_pkey on accounts (cost=0.42..7.47 rows=1 width=16) (actual time=0.009..0.009 rows=1 loops=16,518)

  • Index Cond: (id = dense_balance_transactions.account_id)
8. 40.202 6,612.955 ↓ 1,134,002.0 1,134,002 1

Nested Loop (cost=193.45..46,749.20 rows=1 width=8) (actual time=1,106.355..6,612.955 rows=1,134,002 loops=1)

9. 3,160.952 3,170.747 ↓ 1,134,002.0 1,134,002 1

Bitmap Heap Scan on comp_point_transactions (cost=193.03..46,740.77 rows=1 width=8) (actual time=1,106.021..3,170.747 rows=1,134,002 loops=1)

  • 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))
  • Rows Removed by Index Recheck: 11740243
  • Heap Blocks: lossy=132930
10. 9.795 9.795 ↓ 107.1 1,329,920 1

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

  • 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))
11. 3,402.006 3,402.006 ↑ 1.0 1 1,134,002

Index Scan using comp_point_accounts_pkey on comp_point_accounts (cost=0.42..8.44 rows=1 width=16) (actual time=0.003..0.003 rows=1 loops=1,134,002)

  • Index Cond: (id = comp_point_transactions.comp_point_account_id)
12. 48.600 48.600 ↑ 1.0 1 1,215

Index Scan using index_ad_args_on_user_id on ad_args (cost=0.42..6.63 rows=1 width=8) (actual time=0.039..0.040 rows=1 loops=1,215)

  • Index Cond: (user_id = accounts.user_id)
  • Filter: (btag_net_refer IS NOT NULL)
  • Rows Removed by Filter: 0
13. 3.470 3.470 ↑ 1.0 1 694

Index Scan using users_pkey on users (cost=0.42..1.52 rows=1 width=1,975) (actual time=0.005..0.005 rows=1 loops=694)

  • Index Cond: (id = ad_args.user_id)
  • Filter: (NOT disabled)
  • Rows Removed by Filter: 0
Planning time : 4.991 ms
Execution time : 7,240.487 ms