-
Notifications
You must be signed in to change notification settings - Fork 18
Closed as not planned
Labels
Description
I was doing a test, and found that SQL query
listSQL = fmt.Sprintf(`
SELECT %s
FROM kine AS kv
LEFT JOIN kine kv2
ON kv.name = kv2.name
AND kv.id < kv2.id
WHERE kv2.name IS NULL
AND kv.name >= ? AND kv.name < ?
AND (? OR kv.deleted = 0)
%%s
ORDER BY kv.id ASC
`, columns)
from
https://github.com/canonical/kine/tree/v0.4.1-k8s-dqlite.9
performs very badly in situations where there are many rows with the same name. I do not know how long it takes, I stopped it after few seconds. I think it might have quadratic complexity. This situation can arise in k8s after some problems. That is how I discovered it.
Is this something that is known? Are there any plans to change it?