diff --git a/ext_model/src/note_model/mod.rs b/ext_model/src/note_model/mod.rs index fffd53c..c3dcd9e 100644 --- a/ext_model/src/note_model/mod.rs +++ b/ext_model/src/note_model/mod.rs @@ -45,7 +45,8 @@ impl NoteResolveMode { match self { NoteResolveMode::Single(id) => Ok(id_col.eq(id)), NoteResolveMode::Multiple(ids) => Ok(id_col.is_in(ids)), - // We add a CTE for pins + // We do this in a separate query, because before we used an inner join, and it caused + // a massive performance penalty NoteResolveMode::PinsFromUserId(user_id) => { let cte_query = user_note_pining::Entity::find() .column(user_note_pining::Column::NoteId)