diff options
author | Erik Johnston <erik@matrix.org> | 2016-09-07 14:39:01 +0100 |
---|---|---|
committer | Erik Johnston <erik@matrix.org> | 2016-09-07 14:39:01 +0100 |
commit | fadb01551a897fdf1a2cbe43ff463c9616bd11ad (patch) | |
tree | 82778349690bc874479be8a662ddcf353e612ad7 /synapse/storage | |
parent | Use windowing function to make use of index (diff) | |
download | synapse-fadb01551a897fdf1a2cbe43ff463c9616bd11ad.tar.xz |
Add appopriate framing clause
Diffstat (limited to '')
-rw-r--r-- | synapse/storage/state.py | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/synapse/storage/state.py b/synapse/storage/state.py index 26ecad5907..382f308a60 100644 --- a/synapse/storage/state.py +++ b/synapse/storage/state.py @@ -324,6 +324,7 @@ class StateStore(SQLBaseStore): ) SELECT type, state_key, last_value(event_id) OVER ( PARTITION BY type, state_key ORDER BY state_group ASC + ROWS BETWEEN UNBOUNDED PRECEDING AND UNBOUNDED FOLLOWING ) AS event_id FROM state_groups_state WHERE state_group IN ( SELECT state_group FROM state |