explain.depesz.com

PostgreSQL's explain analyze made readable

Result: x8Pu

Settings
# exclusive inclusive rows x rows loops node
1. 0.021 36.773 ↑ 1.0 1 1

Aggregate (cost=38,027.97..38,027.98 rows=1 width=8) (actual time=36.773..36.773 rows=1 loops=1)

2. 0.006 36.752 ↑ 35.8 4 1

Nested Loop (cost=32,963.74..38,027.61 rows=143 width=4) (actual time=36.455..36.752 rows=4 loops=1)

3. 0.007 36.730 ↑ 45.5 4 1

Nested Loop (cost=32,963.32..37,931.83 rows=182 width=8) (actual time=36.445..36.730 rows=4 loops=1)

4. 0.272 36.703 ↑ 45.5 4 1

Hash Join (cost=32,962.90..36,415.71 rows=182 width=8) (actual time=36.432..36.703 rows=4 loops=1)

  • Hash Cond: (dp.account_id = aty.account_id)
5. 11.985 30.904 ↓ 2.5 541 1

Seq Scan on data_portal dp (cost=32,344.90..35,797.14 rows=214 width=8) (actual time=29.592..30.904 rows=541 loops=1)

  • Filter: ((created > '2019-05-31 00:00:00'::timestamp without time zone) AND (created < '2019-07-01 00:00:00'::timestamp without time zone) AND (NOT (hashed SubPlan 1)))
  • Rows Removed by Filter: 45180
6.          

SubPlan (for Seq Scan)

7. 2.158 18.919 ↑ 12.6 514 1

Gather (cost=1,618.85..32,328.71 rows=6,473 width=4) (actual time=12.132..18.919 rows=514 loops=1)

  • Workers Planned: 1
  • Workers Launched: 1
8. 1.189 16.761 ↑ 14.8 257 2

Nested Loop (cost=618.85..30,681.41 rows=3,808 width=4) (actual time=10.175..16.761 rows=257 loops=2)

9. 1.196 15.569 ↑ 15.2 318 2

Nested Loop (cost=618.42..28,129.58 rows=4,849 width=8) (actual time=9.632..15.569 rows=318 loops=2)

10. 1.726 14.370 ↑ 14.9 325 2

Hash Join (cost=618.00..3,689.92 rows=4,849 width=8) (actual time=9.614..14.370 rows=325 loops=2)

  • Hash Cond: (dp_1.account_id = aty_1.account_id)
11. 6.576 6.576 ↑ 1.2 4,860 2

Parallel Seq Scan on data_portal dp_1 (cost=0.00..3,056.97 rows=5,693 width=8) (actual time=0.360..6.576 rows=4,860 loops=2)

  • Filter: ((created > '2018-12-31 00:00:00'::timestamp without time zone) AND (created < '2019-06-01 00:00:00'::timestamp without time zone))
  • Rows Removed by Filter: 18001
12. 3.028 6.068 ↑ 1.9 8,828 2

Hash (cost=406.40..406.40 rows=16,928 width=8) (actual time=6.067..6.068 rows=8,828 loops=2)

  • Buckets: 32768 Batches: 1 Memory Usage: 601kB
13. 3.040 3.040 ↑ 1.9 8,828 2

Seq Scan on accounts_types aty_1 (cost=0.00..406.40 rows=16,928 width=8) (actual time=0.011..3.040 rows=8,828 loops=2)

  • Filter: (account_type_id = 4)
  • Rows Removed by Filter: 1531
14. 0.003 0.003 ↑ 1.0 1 650

Index Scan using accounts_users_pkey on accounts_users au_1 (cost=0.42..5.04 rows=1 width=8) (actual time=0.003..0.003 rows=1 loops=650)

  • Index Cond: (id = dp_1.accounts_user_id)
15. 0.003 0.003 ↑ 1.0 1 636

Index Scan using users_pkey on users u_1 (cost=0.42..0.53 rows=1 width=4) (actual time=0.003..0.003 rows=1 loops=636)

  • Index Cond: (id = au_1.user_id)
  • Filter: ((email)::text !~~ '%jooraccess.%'::text)
  • Rows Removed by Filter: 0
16. 2.724 5.527 ↑ 1.9 8,828 1

Hash (cost=406.40..406.40 rows=16,928 width=8) (actual time=5.527..5.527 rows=8,828 loops=1)

  • Buckets: 32768 Batches: 1 Memory Usage: 601kB
17. 2.803 2.803 ↑ 1.9 8,828 1

Seq Scan on accounts_types aty (cost=0.00..406.40 rows=16,928 width=8) (actual time=0.010..2.803 rows=8,828 loops=1)

  • Filter: (account_type_id = 4)
  • Rows Removed by Filter: 1531
18. 0.020 0.020 ↑ 1.0 1 4

Index Scan using accounts_users_pkey on accounts_users au (cost=0.42..8.33 rows=1 width=8) (actual time=0.005..0.005 rows=1 loops=4)

  • Index Cond: (id = dp.accounts_user_id)
19. 0.016 0.016 ↑ 1.0 1 4

Index Scan using users_pkey on users u (cost=0.42..0.53 rows=1 width=4) (actual time=0.004..0.004 rows=1 loops=4)

  • Index Cond: (id = au.user_id)
  • Filter: ((email)::text !~~ '%jooraccess.%'::text)
Planning time : 1.043 ms
Execution time : 36.937 ms