session_find.go noCacheFind性能问题 #2042
Labels
No Label
backport/done
backport/v1
blocked
db
oracle
db
sqlserver
duplicate
feature
cache
frontport/done
frontport/main
invalid
kind
breaking
kind
bug
kind
build
kind
dependencies
kind
docs
kind
driver
kind
enhancement
kind
feature
kind
performance
kind
proposal
kind
question
kind
refactor
kind
testing
need
feedback
need
test
proposal:accepted
RaspBerry Pi
regression
skip-changelog
upstream
wip
wontfix
No Milestone
No Assignees
2 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: xorm/xorm#2042
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
engine.Find()方法
调试发现
耗时函数
func (session *Session) noCacheFind(table *core.Table, containerValue reflect.Value, sqlStr string, args ...interface{}) error {}
for rows.Next() {} 耗时几秒以上
结果集4511条数据,大小 1.55MB
反射结果集的时候存在性能问题
How many records do you fetch? And please upgrade your xorm version.
table total record: 94476
select result record: 4511
result size: 1.5MB
I tried it yesterday on
xorm.io/xorm v1.2.3
it also slow, and I checked that the key source code is the same
I'm sure there's a performance problem here
for rows.Next() {}
Please see the logfile and search
TODO
and other Important logs like111111
,222222
,33333
rows.Next
is a simple wrap ofdatabase/sql
, So I think if there is a performance problem. It's upstream related.