mirror of
https://github.com/ddworken/hishtory.git
synced 2025-08-14 09:08:44 +02:00
Add index of start time so that queries with a LIMIT clause can avoid a full table scan (for #202)
This commit is contained in:
@ -2996,7 +2996,7 @@ func BenchmarkQuery(b *testing.B) {
|
||||
// Benchmarked code:
|
||||
b.StartTimer()
|
||||
ctx := hctx.MakeContext()
|
||||
_, err := lib.Search(ctx, hctx.GetDb(ctx), "echo", 0)
|
||||
_, err := lib.Search(ctx, hctx.GetDb(ctx), "echo", 100)
|
||||
require.NoError(b, err)
|
||||
b.StopTimer()
|
||||
}
|
||||
|
Reference in New Issue
Block a user