Fix KV benchmark lookups to order in subqueries before SELECT VALUE
All checks were successful
NuGet Package Publish / nuget (push) Successful in 1m13s
All checks were successful
NuGet Package Publish / nuget (push) Successful in 1m13s
This avoids Surreal parse errors and allows arbitrary context key/value benchmarks to run successfully.
This commit is contained in:
@@ -143,14 +143,16 @@ public class SurrealLogStorageBenchmarks
|
||||
await ExecuteQueryAsync(
|
||||
$"""
|
||||
LET $logIds = (
|
||||
SELECT VALUE logId FROM {LogKvTable}
|
||||
WHERE loggerName = $loggerName
|
||||
AND key = $contextKey
|
||||
AND valueStr = $contextValueStr
|
||||
AND timestamp >= $fromTs
|
||||
AND timestamp <= $toTs
|
||||
ORDER BY timestamp DESC
|
||||
LIMIT 200
|
||||
SELECT VALUE logId FROM (
|
||||
SELECT logId, timestamp FROM {LogKvTable}
|
||||
WHERE loggerName = $loggerName
|
||||
AND key = $contextKey
|
||||
AND valueStr = $contextValueStr
|
||||
AND timestamp >= $fromTs
|
||||
AND timestamp <= $toTs
|
||||
ORDER BY timestamp DESC
|
||||
LIMIT 200
|
||||
)
|
||||
);
|
||||
SELECT * FROM {LogTable}
|
||||
WHERE id INSIDE $logIds
|
||||
@@ -173,14 +175,16 @@ public class SurrealLogStorageBenchmarks
|
||||
await ExecuteQueryAsync(
|
||||
$"""
|
||||
LET $logIds = (
|
||||
SELECT VALUE logId FROM {LogKvTable}
|
||||
WHERE loggerName = $loggerName
|
||||
AND key = $contextKey
|
||||
AND valueNum = $contextValueNum
|
||||
AND timestamp >= $fromTs
|
||||
AND timestamp <= $toTs
|
||||
ORDER BY timestamp DESC
|
||||
LIMIT 200
|
||||
SELECT VALUE logId FROM (
|
||||
SELECT logId, timestamp FROM {LogKvTable}
|
||||
WHERE loggerName = $loggerName
|
||||
AND key = $contextKey
|
||||
AND valueNum = $contextValueNum
|
||||
AND timestamp >= $fromTs
|
||||
AND timestamp <= $toTs
|
||||
ORDER BY timestamp DESC
|
||||
LIMIT 200
|
||||
)
|
||||
);
|
||||
SELECT * FROM {LogTable}
|
||||
WHERE id INSIDE $logIds
|
||||
|
||||
Reference in New Issue
Block a user