Only fetch required fields from database

This commit is contained in:
Erik Johnston 2018-05-08 16:15:07 +01:00
parent 06c0d0ed08
commit 274b8c6025
1 changed files with 2 additions and 1 deletions

View File

@ -796,7 +796,8 @@ class StreamWorkerStore(EventsWorkerStore, SQLBaseStore):
limit_str = ""
sql = (
"SELECT * FROM events"
"SELECT event_id, topological_ordering, stream_ordering"
" FROM events"
" WHERE outlier = ? AND room_id = ? AND %(bounds)s"
" ORDER BY topological_ordering %(order)s,"
" stream_ordering %(order)s %(limit)s"