explain.depesz.com

PostgreSQL's explain analyze made readable

Result: AhrP

Settings
# exclusive inclusive rows x rows loops node
1. 0.003 8,941.230 ↑ 1.0 5 1

Limit (cost=112,232.57..112,232.69 rows=5 width=1,244) (actual time=8,941.224..8,941.230 rows=5 loops=1)

2. 0.004 8,941.227 ↑ 40.0 5 1

Unique (cost=112,232.57..112,237.53 rows=200 width=1,244) (actual time=8,941.223..8,941.227 rows=5 loops=1)

3. 66.692 8,941.223 ↑ 198.4 5 1

Sort (cost=112,232.57..112,235.05 rows=992 width=1,244) (actual time=8,941.222..8,941.223 rows=5 loops=1)

  • Sort Key: r.userid COLLATE "C", r.created DESC
  • Sort Method: quicksort Memory: 38079kB
4. 18.599 8,874.531 ↓ 68.5 67,973 1

Nested Loop Left Join (cost=544.45..112,183.20 rows=992 width=1,244) (actual time=275.450..8,874.531 rows=67,973 loops=1)

5. 35.296 8,787.959 ↓ 68.5 67,973 1

Nested Loop (cost=544.18..111,885.59 rows=992 width=1,203) (actual time=275.444..8,787.959 rows=67,973 loops=1)

6. 1,177.226 8,616.717 ↓ 68.5 67,973 1

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

7. 817.275 4,501.587 ↓ 199.4 2,937,904 1

Nested Loop (cost=543.20..98,842.40 rows=14,737 width=320) (actual time=275.408..4,501.587 rows=2,937,904 loops=1)

8. 507.401 746.408 ↓ 199.4 2,937,904 1

Bitmap Heap Scan on omaha_apprequest ar (cost=542.77..44,092.22 rows=14,737 width=316) (actual time=275.388..746.408 rows=2,937,904 loops=1)

  • Recheck Cond: ((appid)::text = '{98DA7DF2-4E3E-4744-9DE6-EC931886ABAB}'::text)
  • Heap Blocks: exact=151300
9. 239.007 239.007 ↓ 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=239.007..239.007 rows=2,937,904 loops=1)

  • Index Cond: ((appid)::text = '{98DA7DF2-4E3E-4744-9DE6-EC931886ABAB}'::text)
10. 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 ae (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 = ar.id)
  • Heap Fetches: 0
11. 2,937.904 2,937.904 ↓ 0.0 0 2,937,904

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

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

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

  • Index Cond: (id = ar.request_id)
  • Heap Fetches: 0
13. 67.973 67.973 ↑ 1.0 1 67,973

Index Scan using omaha_os_pkey on omaha_os os (cost=0.27..0.29 rows=1 width=41) (actual time=0.001..0.001 rows=1 loops=67,973)

  • Index Cond: (r.os_id = id)