explain.depesz.com

PostgreSQL's explain analyze made readable

Result: XCGh

Settings
# exclusive inclusive rows x rows loops node
1. 0.008 82.692 ↑ 803.0 1 1

Nested Loop (cost=2,269.39..7,851.06 rows=803 width=188) (actual time=59.384..82.692 rows=1 loops=1)

  • Join Filter: ("user".id = user_organisation.user_id)
2. 9.585 42.647 ↑ 786.0 1 1

Hash Join (cost=2,268.97..7,336.76 rows=786 width=196) (actual time=19.340..42.647 rows=1 loops=1)

  • Hash Cond: (system_user.user_id = "user".id)
3. 33.002 33.002 ↓ 1.0 158,060 1

Seq Scan on system_user (cost=0.00..4,470.04 rows=157,304 width=17) (actual time=0.010..33.002 rows=158,060 loops=1)

4. 0.003 0.060 ↑ 781.0 1 1

Hash (cost=2,259.21..2,259.21 rows=781 width=179) (actual time=0.060..0.060 rows=1 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
5. 0.017 0.057 ↑ 781.0 1 1

Bitmap Heap Scan on "user" (cost=26.47..2,259.21 rows=781 width=179) (actual time=0.057..0.057 rows=1 loops=1)

  • Recheck Cond: (lower((username)::text) = 'apikey-10i62tqy4u2y4z3aw3'::text)
  • Heap Blocks: exact=1
6. 0.040 0.040 ↑ 781.0 1 1

Bitmap Index Scan on user_lower_idx (cost=0.00..26.28 rows=781 width=0) (actual time=0.040..0.040 rows=1 loops=1)

  • Index Cond: (lower((username)::text) = 'apikey-10i62tqy4u2y4z3aw3'::text)
7. 40.037 40.037 ↑ 3.0 1 1

Index Scan using user_organisation_user_id_index on user_organisation (cost=0.42..0.62 rows=3 width=8) (actual time=40.036..40.037 rows=1 loops=1)

  • Index Cond: (user_id = system_user.user_id)
  • Filter: is_primary_dealer
Planning time : 1.349 ms
Execution time : 82.756 ms