Commit graph

39 commits

Author SHA1 Message Date
Glauber Costa
471a95bd96 add a benchmark for connection time versus number of tables
SQLite performs poorly for connections as the number of tables increase.

Do we perform better? the same? worse?

Right now the answer is worse. Add a benchmark to help us compare.
2025-07-01 20:10:21 -05:00
Pekka Enberg
12131babae Move UUID extension to core
We want to bundle the UUID extension by default so move the code to core.
2025-06-30 09:54:13 +03:00
Pekka Enberg
725c3e4ddc Rename limbo_sqlite3_parser crate to turso_sqlite3_parser 2025-06-29 12:34:46 +03:00
Pekka Enberg
eb0de4066b Rename limbo_ext crate to turso_ext 2025-06-29 12:14:08 +03:00
Pekka Enberg
eec994386b Rename limbo_macros to turso_macros 2025-06-29 12:00:17 +03:00
Pekka Enberg
53ba3ff926 Rename limbo_core crate to turso_core 2025-06-29 09:59:17 +03:00
Pekka Enberg
018b17b6f2 Rename Limbo to Turso Database 2025-06-26 21:05:02 +03:00
Pekka Enberg
129713018c Bring back TPC-H benchmarks 2025-06-26 10:27:46 +03:00
Pekka Enberg
2fc5c0ce5c Switch to runtime flag for enabling indexes
Makes it easier to test the feature:

```
$ cargo run --  --experimental-indexes
Limbo v0.0.22
Enter ".help" for usage hints.
Connected to a transient in-memory database.
Use ".open FILENAME" to reopen on a persistent database
limbo> CREATE TABLE t(x);
limbo> CREATE INDEX t_idx ON t(x);
limbo> DROP INDEX t_idx;
```
2025-06-26 10:07:28 +03:00
pedrocarlo
80ccca8827 ruff lint fix 2025-06-20 15:59:03 -03:00
Pere Diaz Bou
9aecc1c903 disable constraints on stress test
without indexes constraints are useless
2025-06-18 12:45:04 +02:00
Jussi Saurio
6790b7479c Optimization: lift common subexpressions from OR terms
```sql
-- This PR does effectively this transformation:

select
	sum(l_extendedprice* (1 - l_discount)) as revenue
from
	lineitem,
	part
where
	(
		p_partkey = l_partkey
		and p_brand = 'Brand#22'
		and p_container in ('SM CASE', 'SM BOX', 'SM PACK', 'SM PKG')
		and l_quantity >= 8 and l_quantity <= 8 + 10
		and p_size between 1 and 5
		and l_shipmode in ('AIR', 'AIR REG')
		and l_shipinstruct = 'DELIVER IN PERSON'
	)
	or
	(
		p_partkey = l_partkey
		and p_brand = 'Brand#23'
		and p_container in ('MED BAG', 'MED BOX', 'MED PKG', 'MED PACK')
		and l_quantity >= 10 and l_quantity <= 10 + 10
		and p_size between 1 and 10
		and l_shipmode in ('AIR', 'AIR REG')
		and l_shipinstruct = 'DELIVER IN PERSON'
	)
	or
	(
		p_partkey = l_partkey
		and p_brand = 'Brand#12'
		and p_container in ('LG CASE', 'LG BOX', 'LG PACK', 'LG PKG')
		and l_quantity >= 24 and l_quantity <= 24 + 10
		and p_size between 1 and 15
		and l_shipmode in ('AIR', 'AIR REG')
		and l_shipinstruct = 'DELIVER IN PERSON'
	);

-- Same query with common conjuncts (ANDs) extracted:
select
	sum(l_extendedprice* (1 - l_discount)) as revenue
from
	lineitem,
	part
where
	p_partkey = l_partkey
	and l_shipmode in ('AIR', 'AIR REG')
	and l_shipinstruct = 'DELIVER IN PERSON'
	and (
		(
			p_brand = 'Brand#22'
			and p_container in ('SM CASE', 'SM BOX', 'SM PACK', 'SM PKG')
			and l_quantity >= 8 and l_quantity <= 8 + 10
			and p_size between 1 and 5
		)
		or
		(
			p_brand = 'Brand#23'
			and p_container in ('MED BAG', 'MED BOX', 'MED PKG', 'MED PACK')
			and l_quantity >= 10 and l_quantity <= 10 + 10
			and p_size between 1 and 10
		)
		or
		(
			p_brand = 'Brand#12'
			and p_container in ('LG CASE', 'LG BOX', 'LG PACK', 'LG PKG')
			and l_quantity >= 24 and l_quantity <= 24 + 10
			and p_size between 1 and 15
		)
	);
```
2025-05-20 14:25:15 +03:00
Jussi Saurio
53b135829a tpc-h: fix 'time' output in Ubuntu CI 2025-05-17 16:55:05 +03:00
Jussi Saurio
51b097fa3d perf/ci: add basic tpc-h benchmark 2025-05-15 17:09:49 +03:00
Pere Diaz Bou
004dc374b2 bump rusqlite to 0.34 2025-03-25 14:17:31 +01:00
Pekka Enberg
ddee76e0fd Merge 'Enable Nyrkiö on PRs and clickbench' from Henrik Ingo
- Rename push_only.yml workflow to rust_perf.yml
- Move the 'bench' task from rust.yml to rust_perf.yml
- More Nyrkio configuration options exposed:
  Team support (everyone in gh/tursodatabase can access Nyrkiö)
  Public results
  Alerting options: Comment on PR, if change detected, don't fail task
- Add Nyrkio also to analyse results from the clickbench task

Closes #959
2025-02-26 17:37:39 +02:00
alpaylan
39b11812ea bump rusqlite to 0.33.0 from 0.29.0 2025-02-18 15:13:15 -05:00
Henrik Ingo
811b6df64d Add Nyrkiö to the new clickbench task 2025-02-18 20:46:20 +02:00
Henrik Ingo
32e73d7fb5 Nyrkiö: Analyze limbo and sqlite3 clickbench results separately 2025-02-18 20:34:23 +02:00
Henrik Ingo
24839e6f01 Add Nyrkiö to the new clickbench task 2025-02-18 02:36:39 +02:00
Jussi Saurio
e8c0717f5b Add modified clickbench script to repo + CI 2025-02-15 11:48:06 +02:00
Pekka Enberg
c210821100 core: Move result row to ProgramState
Move result row to `ProgramState` to mimic what SQLite does where `Vdbe`
struct has a `pResultRow` member. This makes it easier to deal with result
lifetime, but more importantly, eventually lazily parse values at the edges of
the API.
2025-02-06 11:52:26 +02:00
Pekka Enberg
7967cc5efc core: Kill Rows wrapper struct
It's just an useless wrapper, kill it.
2025-01-26 16:27:19 +02:00
Pekka Enberg
f2ecebc357 Rename RowResult to StepResult
The name "row result" is confusing because it really *is* a result from
a step() call. The only difference is how a row is represented as we
return from VDBE or from a statement.

Therefore, rename RowResult to StepResult.
2024-12-27 10:20:41 +02:00
Pekka Enberg
2e754e37f1 perf: Update Cargo.lock files
We already bumped up clap to fix up a Github dependabot complaint, but
let's also update the lock files...
2024-12-12 09:08:51 +02:00
Pekka Enberg
617f95c7b6 Update clap to 4.5
The Github dependabot complains about anstream, which comes through `clap`:

https://github.com/tursodatabase/limbo/security/dependabot/8
2024-12-11 14:39:27 +02:00
Pekka Enberg
91702abbe0 perf/latency: Update Cargo.lock
Update Cargo.lock to get the latest jsonb version, which fixes security
issue with fast-float.
2024-11-18 18:46:46 +02:00
jussisaurio
3cc9d9d79f vendor sqlite3-parser (lemon-rs) 2024-11-16 20:08:59 +02:00
Pekka Enberg
62c480f6fb perf/latency: Add rust-toolchain to limbo benchmark
The benchmark uses coroutines, which require nightly so make that
explicit.
2024-07-22 22:24:24 +03:00
Pekka Enberg
e0b332e483 perf/latency: Add README.md 2024-07-22 22:24:00 +03:00
Pekka Enberg
74ecd15fa8 perf/latency: Update limbo benchmark Cargo.lock 2024-07-22 22:21:36 +03:00
Pekka Enberg
eba81faa66 perf/latency: Fix limbo run-benchmark.sh on macOS 2024-07-22 22:21:16 +03:00
Pekka Enberg
c028e93845 perf/latency: Fix limbo benchmark build 2024-07-22 22:20:58 +03:00
Pekka Enberg
704ab4e6b4 perf/latency: Fix seq usage in rusqlite run-benchmark.sh 2024-07-22 22:13:46 +03:00
Pekka Enberg
d3afff316f perf/latency: Fix rusqlite run-benchmark.sh on macOS 2024-07-22 22:10:06 +03:00
Pekka Enberg
1e3a441486 perf/latency: Fix rusqlite benchmark build
Add an empty workspace section to detach the build from the Limbo
workspace.
2024-07-22 22:10:06 +03:00
Joan Martinez
642603b6c7 perf-latency: fix enabling to build multitenancy 2024-07-21 19:13:02 +02:00
Joan Martinez
4bcae54aa9 fix: use Arc to handle IO 2024-07-21 19:01:58 +02:00
Pekka Enberg
3f7574686d Add latency benchmarks used in EdgeSys '24 paper 2024-07-13 11:12:54 +03:00