explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 79uo

Settings
# exclusive inclusive rows x rows loops node
1. 0.808 15,602.565 ↑ 1.2 43 1

Limit (cost=1,045,104.68..1,045,104.80 rows=50 width=44) (actual time=15,602.557..15,602.565 rows=43 loops=1)

2. 5.171 15,601.757 ↑ 2.6 18,643 1

Sort (cost=1,045,058.18..1,045,181.62 rows=49,379 width=44) (actual time=15,600.591..15,601.757 rows=18,643 loops=1)

  • Sort Key: (max(usertracke0_.login_date))
  • Sort Method: quicksort Memory: 1682kB
3. 3,136.414 15,596.586 ↑ 2.6 18,643 1

HashAggregate (cost=1,040,567.92..1,041,308.61 rows=49,379 width=44) (actual time=15,590.844..15,596.586 rows=18,643 loops=1)

  • Group Key: corp.id
4. 7,100.821 12,460.172 ↓ 19.1 13,931,154 1

Hash Right Join (cost=307,062.11..1,035,109.21 rows=727,829 width=12) (actual time=972.542..12,460.172 rows=13,931,154 loops=1)

  • Hash Cond: (usertracke0_.user_id = user1_.id)
5. 4,388.227 4,388.227 ↓ 1.0 14,242,219 1

Seq Scan on user_tracker usertracke0_ (cost=0.00..667,360.95 rows=14,242,095 width=12) (actual time=0.110..4,388.227 rows=14,242,219 loops=1)

6. 152.011 971.124 ↓ 2.0 478,207 1

Hash (cost=304,056.80..304,056.80 rows=240,425 width=16) (actual time=971.124..971.124 rows=478,207 loops=1)

  • Buckets: 524288 (originally 262144) Batches: 1 (originally 1) Memory Usage: 26512kB
7. 314.836 819.113 ↓ 2.0 478,207 1

Hash Join (cost=10,487.94..304,056.80 rows=240,425 width=16) (actual time=122.419..819.113 rows=478,207 loops=1)

  • Hash Cond: (user1_.corporation_id = corp.id)
8. 399.444 458.508 ↑ 1.0 479,187 1

Bitmap Heap Scan on app_user user1_ (cost=5,736.84..295,053.54 rows=492,776 width=16) (actual time=76.463..458.508 rows=479,187 loops=1)

  • Recheck Cond: (deleted = 'N'::bpchar)
  • Heap Blocks: exact=85501
9. 59.064 59.064 ↑ 1.0 486,901 1

Bitmap Index Scan on i_au_corp (cost=0.00..5,613.65 rows=492,776 width=0) (actual time=59.064..59.064 rows=486,901 loops=1)

10. 5.007 45.769 ↓ 1.0 24,164 1

Hash (cost=4,449.95..4,449.95 rows=24,092 width=16) (actual time=45.769..45.769 rows=24,164 loops=1)

  • Buckets: 32768 Batches: 1 Memory Usage: 1389kB
11. 9.114 40.762 ↓ 1.0 24,164 1

Hash Join (cost=1,795.63..4,449.95 rows=24,092 width=16) (actual time=18.597..40.762 rows=24,164 loops=1)

  • Hash Cond: (corporation.id = corp.id)
12. 13.601 16.141 ↓ 1.0 24,164 1

Bitmap Heap Scan on corporation (cost=254.00..2,604.15 rows=24,092 width=8) (actual time=2.743..16.141 rows=24,164 loops=1)

  • Recheck Cond: (deleted = 'N'::bpchar)
  • Heap Blocks: exact=1710
13. 2.540 2.540 ↓ 1.0 24,204 1

Bitmap Index Scan on corporation_del (cost=0.00..247.98 rows=24,092 width=0) (actual time=2.540..2.540 rows=24,204 loops=1)

  • Index Cond: (deleted = 'N'::bpchar)
14. 8.204 15.507 ↓ 1.0 49,456 1

Hash (cost=924.39..924.39 rows=49,379 width=8) (actual time=15.507..15.507 rows=49,456 loops=1)

  • Buckets: 65536 Batches: 1 Memory Usage: 2444kB
15. 7.303 7.303 ↓ 1.0 49,456 1

Index Only Scan using corporation_pkey on corporation corp (cost=0.29..924.39 rows=49,379 width=8) (actual time=0.058..7.303 rows=49,456 loops=1)

  • Heap Fetches: 527