explain.depesz.com

PostgreSQL's explain analyze made readable

Result: TE9w

Settings
# exclusive inclusive rows x rows loops node
1. 123.345 342,851.595 ↑ 1.0 1 1

Aggregate (cost=2,511,691.10..2,511,691.11 rows=1 width=32) (actual time=342,851.594..342,851.595 rows=1 loops=1)

  • Buffers: shared hit=38874426
2. 248.489 342,728.250 ↓ 1.1 129,251 1

Nested Loop Left Join (cost=109,235.07..2,510,549.82 rows=114,128 width=16) (actual time=3,134.362..342,728.250 rows=129,251 loops=1)

  • Buffers: shared hit=38874426
3. 308.295 341,058.000 ↓ 1.1 129,251 1

Nested Loop Left Join (cost=109,234.51..1,820,075.42 rows=114,128 width=61) (actual time=3,134.353..341,058.000 rows=129,251 loops=1)

  • Buffers: shared hit=38699184
4. 259.758 320,845.051 ↓ 1.1 129,251 1

Nested Loop Left Join (cost=109,233.95..1,295,086.62 rows=114,128 width=57) (actual time=3,134.344..320,845.051 rows=129,251 loops=1)

  • Buffers: shared hit=36389623
5. 610.771 4,308.096 ↓ 1.1 129,251 1

Unique (cost=109,233.39..113,291.18 rows=114,128 width=209) (actual time=3,130.276..4,308.096 rows=129,251 loops=1)

  • Buffers: shared hit=10730
6. 3,097.272 3,697.325 ↑ 1.0 782,957 1

Sort (cost=109,233.39..111,262.28 rows=811,558 width=209) (actual time=3,130.272..3,697.325 rows=782,957 loops=1)

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

Index Only Scan using eg_time_userid_nosite on uba_defined_events (cost=0.56..29,577.61 rows=811,558 width=209) (actual time=0.095..600.053 rows=782,957 loops=1)

  • Index Cond: ((eventgroup = '6157f7503f7db0eb0be8f6b36d784ec2'::text) AND (visittime >= '1545696000000'::bigint) AND (visittime < '1546300800000'::bigint))
  • Heap Fetches: 0
  • Buffers: shared hit=10730
8. 258.502 316,277.197 ↓ 0.0 0 129,251

Limit (cost=0.56..10.32 rows=1 width=45) (actual time=2.446..2.447 rows=0 loops=129,251)

  • Buffers: shared hit=36378893
9. 316,018.695 316,018.695 ↓ 0.0 0 129,251

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

  • Index Cond: ((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=36378893
10. 258.502 19,904.654 ↓ 0.0 0 129,251

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

  • Buffers: shared hit=2309561
11. 19,646.152 19,646.152 ↓ 0.0 0 129,251

Index Only Scan using eg_time_userid_nosite on uba_defined_events uba_defined_events_2 (cost=0.56..4.58 rows=1 width=45) (actual time=0.152..0.152 rows=0 loops=129,251)

  • Index Cond: ((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=2309561
12. 258.502 1,421.761 ↓ 0.0 0 129,251

Limit (cost=0.56..6.03 rows=1 width=94) (actual time=0.010..0.011 rows=0 loops=129,251)

  • Buffers: shared hit=175242
13. 1,163.259 1,163.259 ↓ 0.0 0 129,251

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

  • Index Cond: ((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=175242