做性能优化的最重要的功能就是减少数据库的交互,很多程序员一般在开发的时候只考虑简单的实现功能,不管业务简单复杂,只要实现就行。
mybatis有个重要的功能就是考虑在联合查询时技巧:
select t.id,t.name,s.t_s_id,s.sid,s.sname from teacher t join student s on t.id = s.t_s_id where t.id = #{id}
collection