explain.depesz.com

PostgreSQL's explain analyze made readable

Result: W4mF

Settings
# exclusive inclusive rows x rows loops node
1. 129.465 476,342.075 ↑ 1.0 1 1

Aggregate (cost=2,919,281.79..2,919,281.80 rows=1 width=32) (actual time=476,342.074..476,342.075 rows=1 loops=1)

  • Buffers: shared hit=44955421
  • Planning Time: 0.601 ms
  • Execution Time: 476348.252 ms
2. 345.009 476,212.610 ↓ 1.1 129,251 1

Nested Loop Left Join (cost=113,097.96..2,918,140.51 rows=114,128 width=16) (actual time=3,194.861..476,212.610 rows=129,251 loops=1)

  • Buffers: shared hit=44955421
3. 344.935 474,187.338 ↓ 1.1 129,251 1

Nested Loop Left Join (cost=113,097.40..2,180,873.63 rows=114,128 width=61) (actual time=3,194.852..474,187.338 rows=129,251 loops=1)

  • Buffers: shared hit=44765900
4. 288.538 446,311.940 ↓ 1.1 129,251 1

Nested Loop Left Join (cost=113,096.84..1,503,523.95 rows=114,128 width=57) (actual time=3,194.842..446,311.940 rows=129,251 loops=1)

  • Buffers: shared hit=42118038
5. 616.686 4,372.735 ↓ 1.1 129,251 1

Unique (cost=113,096.28..117,154.07 rows=114,128 width=209) (actual time=3,188.944..4,372.735 rows=129,251 loops=1)

  • Buffers: shared hit=12433
6. 3,080.755 3,756.049 ↑ 1.0 782,957 1

Sort (cost=113,096.28..115,125.18 rows=811,558 width=209) (actual time=3,188.940..3,756.049 rows=782,957 loops=1)

  • Sort Key: uba_defined_events.userid, uba_defined_events.visittime
  • Sort Method: quicksort Memory: 85745kB
  • Buffers: shared hit=12433
7. 675.294 675.294 ↑ 1.0 782,957 1

Index Only Scan using eg_time_userid on uba_defined_events (cost=0.56..33,440.51 rows=811,558 width=209) (actual time=0.076..675.294 rows=782,957 loops=1)

  • Index Cond: ((siteid = '514-partycitycom'::text) AND (eventgroup = '6157f7503f7db0eb0be8f6b36d784ec2'::text) AND (visittime >= '1545696000000'::bigint) AND (visittime < '1546300800000'::bigint))
  • Heap Fetches: 0
  • Buffers: shared hit=12433
8. 258.502 441,650.667 ↓ 0.0 0 129,251

Limit (cost=0.56..12.12 rows=1 width=45) (actual time=3.416..3.417 rows=0 loops=129,251)

  • Buffers: shared hit=42105605
9. 441,392.165 441,392.165 ↓ 0.0 0 129,251

Index Only Scan using eg_time_userid on uba_defined_events uba_defined_events_1 (cost=0.56..12.12 rows=1 width=45) (actual time=3.415..3.415 rows=0 loops=129,251)

  • Index Cond: ((siteid = '514-partycitycom'::text) AND (eventgroup = '2ee9baad493990b329d791d0ad6c32a9'::text) AND (visittime > uba_defined_events.visittime) AND (visittime < (uba_defined_events.visittime + '2592000000'::bigint)) AND (userid = (uba_defined_events.userid)::text))
  • Heap Fetches: 0
  • Buffers: shared hit=42105605
10. 129.251 27,530.463 ↓ 0.0 0 129,251

Limit (cost=0.56..5.92 rows=1 width=45) (actual time=0.213..0.213 rows=0 loops=129,251)

  • Buffers: shared hit=2647862
11. 27,401.212 27,401.212 ↓ 0.0 0 129,251

Index Only Scan using eg_time_userid on uba_defined_events uba_defined_events_2 (cost=0.56..5.92 rows=1 width=45) (actual time=0.211..0.212 rows=0 loops=129,251)

  • Index Cond: ((siteid = '514-partycitycom'::text) AND (eventgroup = 'a6cfc74d9c2dbd7c793f3e77f98bbe92'::text) AND (visittime > uba_defined_events_1.visittime) AND (visittime < (uba_defined_events.visittime + '2592000000'::bigint)) AND (userid = (uba_defined_events_1.userid)::text))
  • Heap Fetches: 0
  • Buffers: shared hit=2647862
12. 129.251 1,680.263 ↓ 0.0 0 129,251

Limit (cost=0.56..6.44 rows=1 width=94) (actual time=0.013..0.013 rows=0 loops=129,251)

  • Buffers: shared hit=189521
13. 1,551.012 1,551.012 ↓ 0.0 0 129,251

Index Only Scan using eg_time_userid on uba_defined_events uba_defined_events_3 (cost=0.56..6.44 rows=1 width=94) (actual time=0.012..0.012 rows=0 loops=129,251)

  • Index Cond: ((siteid = '514-partycitycom'::text) AND (eventgroup = 'f97618649cfda4a5f9d18d6810332a2c'::text) AND (visittime > uba_defined_events_2.visittime) AND (visittime < (uba_defined_events.visittime + '2592000000'::bigint)) AND (userid = (uba_defined_events_2.userid)::text))
  • Heap Fetches: 0
  • Buffers: shared hit=189521