explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 8lB3 : Optimization for: plan #enHF

Settings

Optimization path:

# exclusive inclusive rows x rows loops node
1. 51.463 3,012.810 ↑ 1.0 100,000 1

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

2. 342.194 2,961.347 ↑ 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=2,624.883..2,961.347 rows=100,000 loops=1)

  • Workers Planned: 2
  • Workers Launched: 2
3. 1,344.015 2,619.153 ↑ 28.6 33,422 3 / 3

Sort (cost=1,766,762.50..1,769,149.97 rows=954,986 width=1,303) (actual time=2,601.192..2,619.153 rows=33,422 loops=3)

  • Sort Key: contacts_contact.created
  • Sort Method: external merge Disk: 184808kB
4. 858.399 1,275.138 ↑ 1.2 775,497 3 / 3

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

  • Hash Cond: (contacts_contact.created_by_id = users_user.id)
5. 416.712 416.712 ↑ 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.028..416.712 rows=775,497 loops=3)

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

Hash (cost=4.08..4.08 rows=8 width=159) (actual time=0.027..0.027 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.240 ms
Execution time : 3,066.240 ms