explain.depesz.com

PostgreSQL's explain analyze made readable

Result: UX62

Settings
# exclusive inclusive rows x rows loops node
1. 3.357 9,204.803 ↑ 1.0 1 1

Aggregate (cost=116,520.19..116,520.20 rows=1 width=0) (actual time=9,204.803..9,204.803 rows=1 loops=1)

2. 5.336 9,201.446 ↑ 21.9 67,184 1

Nested Loop (cost=111,942.85..112,835.92 rows=1,473,708 width=0) (actual time=9,044.017..9,201.446 rows=67,184 loops=1)

3. 31.460 9,061.742 ↓ 335.9 67,184 1

HashAggregate (cost=111,942.42..111,944.42 rows=200 width=4) (actual time=9,043.984..9,061.742 rows=67,184 loops=1)

  • Group Key: u0.id
4. 7.855 9,030.282 ↓ 335.9 67,184 1

Unique (cost=111,934.96..111,939.92 rows=200 width=110) (actual time=9,011.790..9,030.282 rows=67,184 loops=1)

5. 48.204 9,022.427 ↓ 68.5 67,973 1

Sort (cost=111,934.96..111,937.44 rows=992 width=110) (actual time=9,011.789..9,022.427 rows=67,973 loops=1)

  • Sort Key: omaha_request.userid COLLATE "C", omaha_request.created DESC
  • Sort Method: quicksort Memory: 8378kB
6. 43.066 8,974.223 ↓ 68.5 67,973 1

Nested Loop (cost=544.18..111,885.59 rows=992 width=110) (actual time=281.693..8,974.223 rows=67,973 loops=1)

7. 1,245.890 8,795.211 ↓ 68.5 67,973 1

Nested Loop (cost=543.63..107,792.63 rows=992 width=8) (actual time=281.682..8,795.211 rows=67,973 loops=1)

8. 916.392 4,611.417 ↓ 199.4 2,937,904 1

Nested Loop (cost=543.20..98,842.40 rows=14,737 width=12) (actual time=281.669..4,611.417 rows=2,937,904 loops=1)

9. 514.268 757.121 ↓ 199.4 2,937,904 1

Bitmap Heap Scan on omaha_apprequest u0 (cost=542.77..44,092.22 rows=14,737 width=8) (actual time=281.651..757.121 rows=2,937,904 loops=1)

  • Recheck Cond: ((appid)::text = '{98DA7DF2-4E3E-4744-9DE6-EC931886ABAB}'::text)
  • Heap Blocks: exact=151300
10. 242.853 242.853 ↓ 199.4 2,937,904 1

Bitmap Index Scan on omaha_apprequest_7aa64062 (cost=0.00..539.08 rows=14,737 width=0) (actual time=242.853..242.853 rows=2,937,904 loops=1)

  • Index Cond: ((appid)::text = '{98DA7DF2-4E3E-4744-9DE6-EC931886ABAB}'::text)
11. 2,937.904 2,937.904 ↑ 1.0 1 2,937,904

Index Only Scan using omaha_apprequest_events_apprequest_id_fe1d45b7_uniq on omaha_apprequest_events u1 (cost=0.43..3.71 rows=1 width=8) (actual time=0.001..0.001 rows=1 loops=2,937,904)

  • Index Cond: (apprequest_id = u0.id)
  • Heap Fetches: 0
12. 2,937.904 2,937.904 ↓ 0.0 0 2,937,904

Index Scan using omaha_event_pkey on omaha_event u2 (cost=0.43..0.60 rows=1 width=4) (actual time=0.001..0.001 rows=0 loops=2,937,904)

  • Index Cond: (id = u1.event_id)
  • Filter: ((eventtype = ANY ('{2,3}'::integer[])) AND (eventresult = 1))
  • Rows Removed by Filter: 1
13. 135.946 135.946 ↑ 1.0 1 67,973

Index Only Scan using omaha_request_version_4 on omaha_request (cost=0.56..4.12 rows=1 width=110) (actual time=0.002..0.002 rows=1 loops=67,973)

  • Index Cond: (id = u0.request_id)
  • Heap Fetches: 0
14. 134.368 134.368 ↑ 1.0 1 67,184

Index Only Scan using omaha_apprequest_pkey on omaha_apprequest (cost=0.43..4.45 rows=1 width=4) (actual time=0.002..0.002 rows=1 loops=67,184)

  • Index Cond: (id = u0.id)
  • Heap Fetches: 0