explain.depesz.com

PostgreSQL's explain analyze made readable

Result: ebei

Settings
# exclusive inclusive rows x rows loops node
1. 68,243.349 70,487.591 ↓ 2.0 304,720 1

Hash Right Join (cost=228,516.79..276,325.60 rows=153,787 width=167) (actual time=2,195.165..70,487.591 rows=304,720 loops=1)

  • Hash Cond: (default_address.id = users.default_correspondence_address_id)
2. 62.083 62.083 ↑ 1.0 244,048 1

Seq Scan on allowed_addresses default_address (cost=0.00..5,667.48 rows=244,048 width=36) (actual time=0.021..62.083 rows=244,048 loops=1)

3. 801.353 2,182.159 ↓ 2.0 304,720 1

Hash (cost=224,491.45..224,491.45 rows=153,787 width=87) (actual time=2,182.159..2,182.159 rows=304,720 loops=1)

  • Buckets: 32,768 (originally 32768) Batches: 262,144 (originally 8) Memory Usage: 8,177kB
4. 179.425 1,380.806 ↓ 2.0 304,720 1

Hash Right Join (cost=213,719.80..224,491.45 rows=153,787 width=87) (actual time=1,176.857..1,380.806 rows=304,720 loops=1)

  • Hash Cond: (fallback_address_zip_code.user_id = users.id)
5. 24.682 24.682 ↑ 1.0 242,180 1

Seq Scan on allowed_addresses_reduced fallback_address_zip_code (cost=0.00..3,722.80 rows=242,180 width=36) (actual time=0.041..24.682 rows=242,180 loops=1)

6. 74.861 1,176.699 ↓ 2.0 304,720 1

Hash (cost=210,144.47..210,144.47 rows=153,787 width=59) (actual time=1,176.699..1,176.699 rows=304,720 loops=1)

  • Buckets: 65,536 Batches: 8 Memory Usage: 3,683kB
7. 106.354 1,101.838 ↓ 2.0 304,720 1

Gather (cost=86,339.64..210,144.47 rows=153,787 width=59) (actual time=422.515..1,101.838 rows=304,720 loops=1)

  • Workers Planned: 2
  • Workers Launched: 2
8. 48.467 995.484 ↓ 1.6 101,573 3 / 3

Nested Loop Left Join (cost=85,339.64..193,765.77 rows=64,078 width=59) (actual time=373.375..995.484 rows=101,573 loops=3)

9. 82.536 642.297 ↓ 1.6 101,573 3 / 3

Hash Left Join (cost=85,339.21..145,575.60 rows=64,078 width=53) (actual time=373.355..642.297 rows=101,573 loops=3)

  • Hash Cond: (users.id = birthyearfield.user_id)
10. 115.409 403.852 ↓ 1.6 101,573 3 / 3

Hash Join (cost=44,248.54..102,102.72 rows=64,078 width=47) (actual time=216.891..403.852 rows=101,573 loops=3)

  • Hash Cond: (users.id = admeiraoptinfield.user_id)
11. 72.068 72.068 ↑ 1.3 176,930 3 / 3

Parallel Seq Scan on users (cost=0.00..52,784.63 rows=221,163 width=47) (actual time=0.005..72.068 rows=176,930 loops=3)

12. 63.158 216.375 ↓ 2.0 304,720 3 / 3

Hash (cost=41,725.20..41,725.20 rows=153,787 width=4) (actual time=216.374..216.375 rows=304,720 loops=3)

  • Buckets: 131,072 Batches: 4 Memory Usage: 3,706kB
13. 135.524 153.217 ↓ 2.0 304,720 3 / 3

Bitmap Heap Scan on user_fields admeiraoptinfield (cost=6,961.67..41,725.20 rows=153,787 width=4) (actual time=21.682..153.217 rows=304,720 loops=3)

  • Recheck Cond: (key_id = 67)
  • Filter: ((value)::boolean IS TRUE)
  • Rows Removed by Filter: 1,988
  • Heap Blocks: exact=25,901
14. 17.693 17.693 ↑ 1.0 306,708 3 / 3

Bitmap Index Scan on user_fields_key_value_idx (cost=0.00..6,923.23 rows=307,573 width=0) (actual time=17.693..17.693 rows=306,708 loops=3)

  • Index Cond: (key_id = 67)
15. 47.175 155.909 ↓ 1.0 225,577 3 / 3

Hash (cost=37,224.81..37,224.81 rows=222,389 width=10) (actual time=155.909..155.909 rows=225,577 loops=3)

  • Buckets: 131,072 Batches: 4 Memory Usage: 3,455kB
16. 85.567 108.734 ↓ 1.0 225,577 3 / 3

Bitmap Heap Scan on user_fields birthyearfield (cost=5,063.94..37,224.81 rows=222,389 width=10) (actual time=28.153..108.734 rows=225,577 loops=3)

  • Recheck Cond: (key_id = 5)
  • Heap Blocks: exact=27,009
17. 23.167 23.167 ↓ 1.0 225,577 3 / 3

Bitmap Index Scan on user_fields_key_value_idx (cost=0.00..5,008.35 rows=222,389 width=0) (actual time=23.167..23.167 rows=225,577 loops=3)

  • Index Cond: (key_id = 5)
18. 304.720 304.720 ↑ 1.0 1 304,720 / 3

Index Scan using user_fields_pkey on user_fields genderfield (cost=0.43..0.75 rows=1 width=10) (actual time=0.003..0.003 rows=1 loops=304,720)

  • Index Cond: ((users.id = user_id) AND (key_id = 2))
Planning time : 0.983 ms
Execution time : 70,504.382 ms