diff --git a/tests/ZB.MOM.WW.CDBBC.E2E.Benchmark.Tests/SurrealLogStorageBenchmarks.cs b/tests/ZB.MOM.WW.CDBBC.E2E.Benchmark.Tests/SurrealLogStorageBenchmarks.cs index 4e9373a..764cb9f 100644 --- a/tests/ZB.MOM.WW.CDBBC.E2E.Benchmark.Tests/SurrealLogStorageBenchmarks.cs +++ b/tests/ZB.MOM.WW.CDBBC.E2E.Benchmark.Tests/SurrealLogStorageBenchmarks.cs @@ -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