explain.depesz.com

PostgreSQL's explain analyze made readable

Result: EOB

Settings
# exclusive inclusive rows x rows loops node
1. 0.055 48,727.157 ↑ 1.0 25 1

Limit (cost=1,319,951.04..1,319,991.78 rows=25 width=791) (actual time=48,348.839..48,727.157 rows=25 loops=1)

2. 0.062 48,727.102 ↑ 235,090.0 25 1

Nested Loop Left Join (cost=1,319,951.04..10,898,293.06 rows=5,877,250 width=791) (actual time=48,348.836..48,727.102 rows=25 loops=1)

3. 0.091 48,726.940 ↑ 235,090.0 25 1

Nested Loop (cost=1,319,950.77..9,135,102.11 rows=5,877,250 width=750) (actual time=48,348.801..48,726.940 rows=25 loops=1)

4. 1,016.482 48,726.549 ↑ 235,090.0 25 1

Merge Semi Join (cost=1,319,950.33..2,411,509.14 rows=5,877,250 width=75) (actual time=48,348.755..48,726.549 rows=25 loops=1)

  • Merge Cond: (omaha_apprequest.id = v0.id)
5. 1,329.329 1,329.329 ↑ 4.6 2,538,397 1

Index Scan using omaha_apprequest_pkey on omaha_apprequest (cost=0.43..457,528.22 rows=11,791,052 width=75) (actual time=0.005..1,329.329 rows=2,538,397 loops=1)

6. 0.039 46,380.738 ↑ 235,090.0 25 1

Materialize (cost=1,319,949.90..1,851,037.67 rows=5,877,250 width=8) (actual time=46,178.980..46,380.738 rows=25 loops=1)

7. 1,000.510 46,380.699 ↑ 235,090.0 25 1

Merge Join (cost=1,319,949.90..1,836,344.55 rows=5,877,250 width=8) (actual time=46,178.975..46,380.699 rows=25 loops=1)

  • Merge Cond: (v0.id = "ANY_subquery".id)
8. 1,626.411 1,626.411 ↑ 4.6 2,534,277 1

Index Scan using omaha_apprequest_pkey on omaha_apprequest v0 (cost=0.43..487,005.85 rows=11,754,500 width=4) (actual time=0.005..1,626.411 rows=2,534,277 loops=1)

  • Filter: ((appid)::text = '{98DA7DF2-4E3E-4744-9DE6-EC931886ABAB}'::text)
  • Rows Removed by Filter: 4120
9. 163.215 43,753.778 ↑ 7.7 26 1

Sort (cost=1,319,949.46..1,319,949.96 rows=200 width=4) (actual time=43,753.748..43,753.778 rows=26 loops=1)

  • Sort Key: "ANY_subquery".id
  • Sort Method: quicksort Memory: 24617kB
10. 414.127 43,590.563 ↓ 1,315.0 263,009 1

HashAggregate (cost=1,319,939.82..1,319,941.82 rows=200 width=4) (actual time=43,397.153..43,590.563 rows=263,009 loops=1)

  • Group Key: "ANY_subquery".id
11. 207.503 43,176.436 ↓ 2.7 263,009 1

Subquery Scan on ANY_subquery (cost=1,314,785.14..1,319,692.17 rows=99,057 width=4) (actual time=42,559.249..43,176.436 rows=263,009 loops=1)

12. 227.601 42,968.933 ↓ 2.7 263,009 1

Unique (cost=1,314,785.14..1,318,701.60 rows=99,057 width=45) (actual time=42,559.245..42,968.933 rows=263,009 loops=1)

13. 965.670 42,741.332 ↑ 2.9 274,353 1

Sort (cost=1,314,785.14..1,316,743.37 rows=783,292 width=45) (actual time=42,559.244..42,741.332 rows=274,353 loops=1)

  • Sort Key: omaha_request_1.userid, omaha_request_1.created DESC
  • Sort Method: quicksort Memory: 33692kB
14. 7,974.684 41,775.662 ↑ 2.9 274,353 1

Hash Join (cost=835,538.33..1,238,104.03 rows=783,292 width=45) (actual time=27,306.290..41,775.662 rows=274,353 loops=1)

  • Hash Cond: (omaha_request_1.id = u0.request_id)
15. 6,498.900 6,498.900 ↑ 1.0 11,789,679 1

Seq Scan on omaha_request omaha_request_1 (cost=0.00..350,506.29 rows=11,793,729 width=45) (actual time=0.010..6,498.900 rows=11,789,679 loops=1)

16. 192.528 27,302.078 ↑ 2.9 274,353 1

Hash (cost=825,747.18..825,747.18 rows=783,292 width=8) (actual time=27,302.077..27,302.078 rows=274,353 loops=1)

  • Buckets: 1048576 Batches: 1 Memory Usage: 18909kB
17. 7,274.154 27,109.550 ↑ 2.9 274,353 1

Hash Join (cost=504,444.30..825,747.18 rows=783,292 width=8) (actual time=14,389.513..27,109.550 rows=274,353 loops=1)

  • Hash Cond: (u0.id = u1.apprequest_id)
18. 5,450.282 5,450.282 ↑ 1.0 11,789,679 1

Seq Scan on omaha_apprequest u0 (cost=0.00..269,253.52 rows=11,791,052 width=8) (actual time=0.011..5,450.282 rows=11,789,679 loops=1)

19. 196.229 14,385.114 ↑ 2.9 274,353 1

Hash (cost=494,653.15..494,653.15 rows=783,292 width=4) (actual time=14,385.114..14,385.114 rows=274,353 loops=1)

  • Buckets: 1048576 Batches: 1 Memory Usage: 17838kB
20. 7,183.192 14,188.885 ↑ 2.9 274,353 1

Hash Join (cost=260,986.11..494,653.15 rows=783,292 width=4) (actual time=1,919.053..14,188.885 rows=274,353 loops=1)

  • Hash Cond: (u1.event_id = u2.id)
21. 5,091.254 5,091.254 ↓ 1.0 11,789,679 1

Seq Scan on omaha_apprequest_events u1 (cost=0.00..181,624.77 rows=11,789,677 width=8) (actual time=0.010..5,091.254 rows=11,789,679 loops=1)

22. 181.648 1,914.439 ↑ 2.9 274,353 1

Hash (cost=251,197.38..251,197.38 rows=783,098 width=4) (actual time=1,914.438..1,914.439 rows=274,353 loops=1)

  • Buckets: 1048576 Batches: 1 Memory Usage: 17838kB
23. 1,732.791 1,732.791 ↑ 2.9 274,353 1

Seq Scan on omaha_event u2 (cost=0.00..251,197.38 rows=783,098 width=4) (actual time=0.016..1,732.791 rows=274,353 loops=1)

  • Filter: ((eventtype = ANY ('{2,3}'::integer[])) AND (eventresult = 1))
  • Rows Removed by Filter: 11515326
24. 0.300 0.300 ↑ 1.0 1 25

Index Scan using omaha_request_pkey on omaha_request (cost=0.43..1.13 rows=1 width=675) (actual time=0.012..0.012 rows=1 loops=25)

  • Index Cond: (id = omaha_apprequest.request_id)
25. 0.100 0.100 ↑ 1.0 1 25

Index Scan using omaha_os_pkey on omaha_os (cost=0.27..0.29 rows=1 width=41) (actual time=0.004..0.004 rows=1 loops=25)

  • Index Cond: (omaha_request.os_id = id)