Covering indexes
The query in this Block sorts by position and reads title. With this index an index-only scan is enough, with no trip to the table.
create index lessons_topic_idxRemoved: on lessons (topic_id);Added: on lessons (topic_id, position)Added: include (title);