explain.depesz.com

PostgreSQL's explain analyze made readable

Result: P1cM

Settings
# exclusive inclusive rows x rows loops node
1. 132.926 2,778.775 ↓ 2.1 500,000 1

Unique (cost=138,900.03..142,404.81 rows=233,652 width=53) (actual time=2,410.889..2,778.775 rows=500,000 loops=1)

2.          

Initplan (forUnique)

3. 0.000 0.000 ↑ 1.0 1 1

Result (cost=0.00..0.01 rows=1 width=0) (actual time=0.000..0.000 rows=1 loops=1)

4. 813.155 2,645.849 ↓ 2.1 500,000 1

Sort (cost=138,900.02..139,484.15 rows=233,652 width=53) (actual time=2,410.888..2,645.849 rows=500,000 loops=1)

  • Sort Key: player_personal_details.player_id, player_personal_details.player_first_name, player_personal_details.player_last_name, player_personal_details.player_username, (COALESCE(player_back_office_data.referral_id, 0::bigint))
  • Sort Method: external merge Disk: 32216kB
5. 69.536 1,832.694 ↓ 2.1 500,000 1

Result (cost=42,673.75..110,078.27 rows=233,652 width=53) (actual time=675.364..1,832.694 rows=500,000 loops=1)

  • One-Time Filter: $0
6. 730.103 1,763.158 ↓ 2.1 500,000 1

Hash Join (cost=42,673.75..110,078.27 rows=233,652 width=53) (actual time=675.361..1,763.158 rows=500,000 loops=1)

  • Hash Cond: (player_personal_details.player_id = player_back_office_data.player_id)
7. 358.212 358.212 ↑ 1.0 500,000 1

Seq Scan on player_personal_details (cost=0.00..51,387.00 rows=500,000 width=45) (actual time=0.002..358.212 rows=500,000 loops=1)

8. 118.127 674.843 ↓ 2.1 500,000 1

Hash (cost=38,612.10..38,612.10 rows=233,652 width=16) (actual time=674.843..674.843 rows=500,000 loops=1)

  • Buckets: 16384 Batches: 4 Memory Usage: 3924kB
9. 556.716 556.716 ↓ 2.1 500,000 1

Seq Scan on player_back_office_data (cost=0.00..38,612.10 rows=233,652 width=16) (actual time=0.044..556.716 rows=500,000 loops=1)

  • Filter: (SubPlan 2)
10.          

SubPlan (forSeq Scan)

11. 0.000 0.000 ↑ 1.0 1 500,000

Result (cost=0.00..0.01 rows=1 width=0) (actual time=0.000..0.000 rows=1 loops=500,000)