Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Sort (cost=3002118.64..3002143.64 rows=10000 width=40) (actual time=7573.930..7574.303 rows=10000 loops=1)
- Sort Key: t.user_id, t.event_type, t.ts
- Sort Method: quicksort Memory: 1166kB
- Buffers: shared hit=9909
- CTE t
- -> WindowAgg (cost=0.29..854.26 rows=10000 width=24) (actual time=0.025..21.393 rows=10000 loops=1)
- Buffers: shared hit=9909
- -> Index Scan using events_fast_idx on events (cost=0.29..654.26 rows=10000 width=24) (actual time=0.016..9.437 rows=10000 loops=1)
- Buffers: shared hit=9909
- -> Nested Loop (cost=300.01..3000600.00 rows=10000 width=40) (actual time=28.542..7571.192 rows=10000 loops=1)
- Buffers: shared hit=9909
- -> CTE Scan on t (cost=0.00..200.00 rows=10000 width=32) (actual time=0.027..1.120 rows=10000 loops=1)
- Buffers: shared hit=3
- -> Limit (cost=300.01..300.01 rows=1 width=16) (actual time=0.756..0.756 rows=1 loops=10000)
- Buffers: shared hit=9906
- -> Sort (cost=300.01..300.01 rows=1 width=16) (actual time=0.756..0.756 rows=1 loops=10000)
- Sort Key: tt.ts
- Sort Method: quicksort Memory: 25kB
- Buffers: shared hit=9906
- -> CTE Scan on t tt (cost=0.00..300.00 rows=1 width=16) (actual time=0.374..0.755 rows=2 loops=10000)
- Filter: ((user_id = t.user_id) AND (event_type = t.event_type) AND (ts >= (t.ts - '30 days'::interval)))
- Rows Removed by Filter: 9998
- Buffers: shared hit=9906
- Planning time: 0.314 ms
- Execution time: 7574.815 ms
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement