explain.depesz.com

PostgreSQL's explain analyze made readable

Result: BIrG

Settings

Optimization(s) for this plan:

# exclusive inclusive rows x rows loops node
1. 40.977 2,050.935 ↑ 1.0 100,000 1

Limit (cost=1,767,762.52..1,779,430.01 rows=100,000 width=1,303) (actual time=1,883.614..2,050.935 rows=100,000 loops=1)

2. 113.266 2,009.958 ↑ 19.1 100,000 1

Gather Merge (cost=1,767,762.52..1,990,608.15 rows=1,909,972 width=1,303) (actual time=1,883.612..2,009.958 rows=100,000 loops=1)

  • Workers Planned: 2
  • Workers Launched: 2
3. 979.218 1,896.692 ↑ 28.5 33,494 3 / 3

Sort (cost=1,766,762.50..1,769,149.97 rows=954,986 width=1,303) (actual time=1,880.347..1,896.692 rows=33,494 loops=3)

  • Sort Key: contacts_contact.created
  • Sort Method: external merge Disk: 175672kB
4. 631.520 917.474 ↑ 1.2 775,497 3 / 3

Hash Left Join (cost=4.18..46,371.44 rows=954,986 width=1,303) (actual time=0.095..917.474 rows=775,497 loops=3)

  • Hash Cond: (contacts_contact.created_by_id = users_user.id)
5. 285.926 285.926 ↑ 1.2 775,497 3 / 3

Parallel Seq Scan on contacts_contact (cost=0.00..42,532.40 rows=954,986 width=1,144) (actual time=0.027..285.926 rows=775,497 loops=3)

  • Filter: ((state <> 2) AND (state <> 2))
  • Rows Removed by Filter: 11831
6. 0.013 0.028 ↑ 1.0 8 3 / 3

Hash (cost=4.08..4.08 rows=8 width=159) (actual time=0.028..0.028 rows=8 loops=3)

  • Buckets: 1024 Batches: 1 Memory Usage: 10kB
7. 0.015 0.015 ↑ 1.0 8 3 / 3

Seq Scan on users_user (cost=0.00..4.08 rows=8 width=159) (actual time=0.007..0.015 rows=8 loops=3)

Planning time : 0.284 ms
Execution time : 2,097.592 ms