-
Notifications
You must be signed in to change notification settings - Fork 5.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
UnionScan is extremely inefficient on reading #32433
Labels
type/enhancement
The issue or PR belongs to an enhancement.
Comments
tiancaiamao
added
the
type/enhancement
The issue or PR belongs to an enhancement.
label
Feb 17, 2022
tiancaiamao
changed the title
UnionScan is extremely inefficient
UnionScan is extremely inefficient on reading
Feb 17, 2022
go test -run TestXXX -bench BenchmarkUnionScanRead -cpuprofile cpu.out -memprofile mem.out -benchtime 30s
On my PC (AMD 4750G), you can see it takes 15.2ms for each operation... |
The time consumed in |
Never mind, I used 5.3.0. |
ti-chi-bot
pushed a commit
that referenced
this issue
Apr 1, 2022
It's slightly better after #32668 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Enhancement
Scan 8000+ rows take 20ms!
I first found this issue when testing cached table #25293.
Without cache, less than 10ms:
With cache, it takes 20ms:
The data rows is 8000:
It's quite counterintuitive that reading data from cache in TiDB slower than get the data from TiKV.
So I dig into it, and find the reason.
UnionScan is extremely inefficient when reading data from membuffer!
The text was updated successfully, but these errors were encountered: