From 1e4217c90c730e8dc18e2f8ce11c15f498ad7909 Mon Sep 17 00:00:00 2001 From: David Baker Date: Thu, 18 Aug 2016 17:53:44 +0100 Subject: Explicit join --- synapse/storage/receipts.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'synapse/storage/receipts.py') diff --git a/synapse/storage/receipts.py b/synapse/storage/receipts.py index cb4e04a679..2c1df0e2b9 100644 --- a/synapse/storage/receipts.py +++ b/synapse/storage/receipts.py @@ -100,8 +100,8 @@ class ReceiptsStore(SQLBaseStore): sql = ( "SELECT rl.room_id, rl.event_id," " e.topological_ordering, e.stream_ordering" - " FROM receipts_linearized rl," - " events e" + " FROM receipts_linearized AS rl" + " INNER JOIN events AS e USING (room_id, event_id)" " WHERE rl.room_id = e.room_id" " AND rl.event_id = e.event_id" " AND user_id = ?" -- cgit 1.4.1