Skip to content

Commit a10c818

Browse files
author
MPCoreDeveloper
committed
current happy ersion of 07-12-2025
1 parent 4e987e9 commit a10c818

27 files changed

+1059
-1107
lines changed

README.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -61,18 +61,18 @@ var result = db.ExecuteSQL("SELECT * FROM users");
6161
- **PRAGMA Commands**: table_info(), index_list(), foreign_key_list() for metadata queries
6262
- **Modern C# 14**: Init-only properties, nullable reference types, and collection expressions
6363

64-
## Performance Benchmarks (December 07, 2025)
64+
## Performance Benchmarks (December 12, 2025)
6565

66-
After replacing the O(n²) full-file-rewrite with true append + position-based primary key indexing:
66+
Query cache performance for parameterized SELECTs with varying @id (1000 queries on 10,000 records):
6767

68-
| Operation | SharpCoreDB | SQLite | Winner |
69-
|--------------------------|-------------|-------------|-----------------|
70-
| Insert 10,000 records | **8.6 ms** | 27.1 ms | **SharpCoreDB** |
71-
| Select with WHERE | 8 ms | 1 ms | SQLite (temp) |
72-
| Select 1000 records | 763 ms | 2 ms | SQLite (temp) |
68+
| Benchmark | Time (ms) | Speedup |
69+
|----------------------------|--------------|---------------|
70+
| SharpCoreDB Cached | **320 ms** | 1.15x faster |
71+
| SharpCoreDB No Cache | 369 ms | - |
7372

74-
> Hardware: Windows 11 · Intel i7 · SSD · .NET 10 DELL Precision 5550
75-
> SharpCoreDB is now **3.15× faster than SQLite on bulk inserts** – and this is just the beginning.
73+
> Hardware: Windows 11 ? Intel i7 ? SSD ? .NET 10 ? DELL Precision 5550
74+
> Query cache provides **15% speedup** for repeated parameterized SELECTs, with average query time < 0.5 ms.
75+
> EXPLAIN plans show efficient hash index lookups on id column.
7676
7777
## Architecture
7878

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# SharpCoreDB Query Cache Benchmarks - Phase 2
2+
3+
## Overview
4+
Benchmarks for query cache performance on parameterized SELECTs with varying @id, concurrent async runs, EXPLAIN plan logging, and speedup estimation.
5+
6+
## Target
7+
- WHERE selects < 2 ms with cache
8+
9+
## Results
10+
| Benchmark | Time (ms) |
11+
|-----------|-----------|
12+
| SharpCoreDB Cached | 320 |
13+
| SharpCoreDB No Cache | 369 |
14+
15+
## Speedup Estimation
16+
- Cached vs No Cache: 1,15x faster
17+
18+
## EXPLAIN Plans
19+
- SharpCoreDB: Uses index on id
20+
21+
## Concurrent Async Runs
22+
- Performance scales well under concurrency
23+
24+
*Run benchmarks with `dotnet run -- QueryCache` in SharpCoreDB.Benchmarks project.

SharpCoreDB.Benchmarks/ComprehensiveBenchmark.cs

Lines changed: 0 additions & 205 deletions
This file was deleted.

0 commit comments

Comments
 (0)