4

同一条sql在navicate中执行很快,用mybatis执行时约3s。

 2 years ago
source link: https://www.oschina.net/question/2312022_2323093
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

同一条sql在navicate中执行很快,用mybatis执行时约3s。

求是科技 发布于 07/02 15:22
阅读 205

很简单的一条sql,select id,name,logo,gender from t_user。t_user表的数据量约20条。这条sql在navicate中执行时,约0.003s。但是采用usermapper.queryAll查询时,约2.5s到3s。数据库是postgresql。t_user表用到的类型有int8(对应java Long)、varchar(对应java String)、timestamp(对应java.sql.timestamp)。字段类型都是对齐,没搞懂这条sql经过mybatis之后需要花费约3s时间。


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK