Сесия 9: Седмица 3 — JOIN Performance
CI / test (push) Has been cancelled
CI / verify (push) Has been cancelled
Clients CI / build-server (push) Has been cancelled
Clients CI / test-python (push) Has been cancelled
Clients CI / test-javascript (push) Has been cancelled
Clients CI / test-nim (push) Has been cancelled
Clients CI / test-rust (push) Has been cancelled

- Добавен IRJoinStrategy enum (nestedLoop, hash, indexNestedLoop)
- Hash Join: build hash table върху по-малката страна, probe от другата
- Index Nested Loop Join: използва B-Tree индекс за point lookup
- Query planner chooseJoinStrategy избира стратегия според наличие на индекс
- LEFT/RIGHT/FULL JOIN fallback-ват към Nested Loop
- PK индексите се игнорират за INL (само explicit индекси)

- Benchmark: JOIN 10K ~115ms (Hash), ~90ms (Index NL)
- 5 нови теста за join performance и planner избор

Тестове: 316 — 0 failures
Build: 0 warnings
This commit is contained in:
2026-05-17 10:50:12 +03:00
parent 9d71edafd4
commit 6021bfcb10
4 changed files with 380 additions and 42 deletions
+7
View File
@@ -69,6 +69,11 @@ type
irjkFull
irjkCross
IRJoinStrategy* = enum
irjsNestedLoop
irjsHash
irjsIndexNestedLoop
IRPlanKind* = enum
irpkScan
irpkFilter
@@ -123,6 +128,8 @@ type
joinCond*: IRExpr
joinAlias*: string
joinLateral*: bool
joinStrategy*: IRJoinStrategy
joinHashCol*: string
of irpkSort:
sortSource*: IRPlan
sortExprs*: seq[IRExpr]