Skip to content

Commit d085678

Browse files
committed
Deliver 0.8.0
1 parent fb5d2aa commit d085678

32 files changed

+3153
-838
lines changed

CHANGELOG.md

+69-17
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,60 @@
11
# Change Log
22

3+
<!--
4+
- distinct
5+
- group by, having
6+
- select expr a+b, a*b
7+
- insert expr
8+
- where a<b
9+
- where exp: OR
10+
- join
11+
- operators: like, in, between
12+
- data types: BOOL, TIMESTAMP
13+
- function (math[abs,round,floor], str[length], time[now()])
14+
- client-server mode
15+
- NULL, autoincr ID
16+
- WAL
17+
- TCP-B
18+
- TCP-C
19+
20+
## 0.7.0 <small>(2024-08-26)</small>
21+
22+
**Features**
23+
**Improvements**
24+
**Test**
25+
**Bug Fixes**
26+
27+
-->
28+
29+
## 0.8.0 <small>(2024-09-03)</small>
30+
31+
**Features**
32+
33+
- `SELECT` supports simple expr, ex: `a + 10` `a - b` [#12](https://github.com/crossdb-org/crossdb/issues/12)
34+
- Support operators: `>`, `>=`, `<`, `<=`, `!=`, `<>` [#13](https://github.com/crossdb-org/CrossDB/issues/13)
35+
- `WHERE` expression supports having the field on the right side, ex: `5 < id`
36+
- `xdb-cli` creates a default memory database, allowing you to directly create tables for practice.
37+
- Support `CMake`
38+
39+
**Improvements**
40+
41+
- Optimize `INSERT` `UPDATE` `DELETE` auto-commit performance for in-memory database
42+
43+
**Test**
44+
45+
- Refactor benchmark test framework and support binding cpu core
46+
- New crossdb and `SQLite` benchmark test driver
47+
- Add C++ `STL Map` and `HashMap(unordered_map)` benchmark test driver
48+
- Import unit test framework
49+
- Add few test cases
50+
51+
**Bug Fixes**
52+
53+
- Fix bug [#15](https://github.com/crossdb-org/CrossDB/issues/15) Segmentation fault occurs while using on-disk database
54+
- Fix close connection then reopen connection will cause previous connection use-after-free issue and memory leak issue
55+
- Fix query misses issue during hash index rehashing
56+
57+
358
## 0.7.0 <small>(2024-08-26)</small>
459

560
**Features**
@@ -13,7 +68,7 @@
1368

1469
- `INSERT` parser avoids malloc
1570
- `UPDATE` only updates affected indexes
16-
- Optimize `INSERT` `UPDATE` `DELETE` auto-commit performance for `IMDB`
71+
- Optimize `INSERT` `UPDATE` `DELETE` auto-commit performance for in-memory database
1772

1873
**Test**
1974

@@ -26,64 +81,61 @@
2681
- Fix bench test time unit `ns` to `us`
2782

2883

29-
## 0.6.0 <small>(2024-08-15)</small>
84+
## 0.6.0 <small>(2024-08-18)</small>
3085

31-
- **Initial refactor release**
86+
**Initial refactor release**
3287

33-
- This project was redesigned and rewritten from scratch
88+
- This project was redesigned and rewritten from scratch for over one year
3489
- Standard RDBMS model
35-
- New APIs which can support more languages
90+
- New SQL APIs which can support more language
91+
- MySQL style SQL and shell, which will be easy to study.
3692

3793

3894
## 0.5.0 <small>(2023-06-26)</small>
3995

40-
Features
96+
**Features**
4197

4298
- CrossDB command line tool `crossdb-cli` is released
4399
- Optimize insert/update/query/delete performance
44100
- Add new API `cross_matchCreate` and `cross_matchFree`
45101
- DML APIs supports `cross_fields_h` and `cross_match_h`
46102

47-
Bug Fixes
103+
**Bug Fixes**
48104

49105

50106
## 0.4.0 <small>(2023-06-20)</small>
51107

52-
Features
108+
**Features**
53109

54110
- Support FreeBSD(X64)
55111
- Optimize insert/update/query/delete performance
56112
- Add new API `cross_fieldsCreate` and `cross_fieldsFree`
57113

58-
Bug Fixes
114+
**Bug Fixes**
59115

60116

61117
## 0.3.0 <small>(2023-06-13)</small>
62118

63-
Features
119+
**Features**
64120

65121
- Support MacOS (X64 and ARM64)
66122
- Change `CROSS_DB_XXX` to `CROSS_XXX`
67123

68-
Bug Fixes
124+
**Bug Fixes**
69125

70126
- `cross_dbTblCreate` flags `CROSS_DB_RBTREE` doesn't create Primary Key Index type correctly
71127

72128

73129
## 0.2.0 <small>(2023-06-07)</small>
74130

75-
Features
131+
**Features**
76132

77133
- Support Windows
78134
- Support Linux ARM64
79135

80-
Bug Fixes
136+
**Bug Fixes**
81137

82138

83139
## 0.1.0 <small>(2023-06-03)</small>
84140

85141
- **Initial release**
86-
87-
Features
88-
89-
Bug Fixes

CMakeLists.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ add_custom_command(
2424

2525
set(CPACK_PACKAGE_NAME crossdb)
2626
set(CPACK_PACKAGE_VERSION_MAJOR 0)
27-
set(CPACK_PACKAGE_VERSION_MINOR 7)
27+
set(CPACK_PACKAGE_VERSION_MINOR 8)
2828
set(CPACK_PACKAGE_VERSION_PATCH 0)
2929
set(CPACK_PACKAGE_CONTACT "crossdb <[email protected]>")
3030
#set(CPACK_GENERATOR DEB)

Makefile

+9
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ help:
1010
@echo "make example Build and run example (need to install crossdb first)"
1111
@echo "make bench Build and run bench test (need to install crossdb first)"
1212
@echo "make bench-sqlite Build and run sqlite bench test (need to install sqlite3 first)"
13+
@echo "make bench-stlmap Build and run C++ STL Map and HashMap(unordered_map) bench test"
1314

1415
.PHONY: build
1516
build:
@@ -22,13 +23,18 @@ debug:
2223
$(CC) -o build/xdb-cli src/xdb-cli.c -lpthread -g
2324
cp include/crossdb.h build/
2425

26+
.PHONY: test
27+
test:
28+
make -C test/
29+
2530
run:
2631
build/xdb-cli
2732

2833
clean:
2934
rm -rf build/*
3035
make -C examples/c/ clean
3136
make -C bench/basic/ clean
37+
make -C test/ clean
3238

3339
wall:
3440
$(CC) -o build/xdb-cli src/xdb-cli.c -lpthread -O2 -Wall
@@ -68,3 +74,6 @@ bench:
6874

6975
bench-sqlite:
7076
make -C bench/basic/ sqlite
77+
78+
bench-stlmap:
79+
make -C bench/basic/ stlmap

README.md

+27-10
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,10 @@
44
</a>
55
</p>
66
<p align="center">
7-
<strong>Super High-performance Lightweight Embedded and Server OLTP RDBMS✨</strong>
7+
<strong>Ultra High-performance Lightweight Embedded and Server OLTP RDBMS✨</strong>
88
</p>
99

10-
> **NOTE**
11-
> This project is still in the early development stage, so please **DO NOT** use in your project now.
12-
13-
**CrossDB** is a super high-performance, lightweight embedded and server OLTP RDBMS.
10+
**CrossDB** is a ultra high-performance, lightweight embedded and server OLTP RDBMS.
1411
It is designed for high-performance scenarios where the main memory can hold the entire database.
1512

1613
## Features
@@ -34,7 +31,7 @@ It is designed for high-performance scenarios where the main memory can hold the
3431
- Supports an embedded CrossDB shell with convenient auto-completion.
3532
- Supports multi-statement APIs.
3633
- Supports prepared statement APIs.
37-
- Super high performance.
34+
- Ultra high performance.
3835
- Very simple: Simple header and library file.
3936
- Zero config: No complex configuration, truly out-of-the-box.
4037

@@ -49,6 +46,13 @@ It is designed for high-performance scenarios where the main memory can hold the
4946

5047
## Build and Install
5148

49+
### Download code
50+
51+
```bash
52+
git clone https://github.com/crossdb-org/crossdb.git
53+
cd crossdb
54+
```
55+
5256
### Linux/FreeBSD
5357

5458
```bash
@@ -82,15 +86,18 @@ sudo make install
8286

8387
## Contribution
8488

85-
Following contributions are welcome:
89+
This project is still in its early stages and currently lacks stability. We welcome the following contributions:
90+
91+
- **Language bindings**: `Python`, `Java`, `Go`, `CSharp`, `JavaScript`, `PHP`, etc.
92+
- **Bug Reporting**: Identify and report any issues or bugs you encounter.
93+
- **Testing**: Participate in testing to ensure the reliability and stability of the project.
8694

87-
- Language bindings: `Python`, `Java`, `Go`, `CSharp`, `Javascript`, `PHP`, etc.
88-
- Testing and bug reporting.
95+
Your contributions will be greatly appreciated and will help us make this project more robust and reliable.
8996

9097

9198
## Reference
9299

93-
### Benchmark vs. SQLite
100+
### 1,000,000 Rows Random Access Benchmark vs. SQLite
94101

95102
<p align="center">
96103
<a href="https://crossdb.org/blog/benchmark/crossdb-vs-sqlite3/">
@@ -100,6 +107,16 @@ Following contributions are welcome:
100107

101108
https://crossdb.org/blog/benchmark/crossdb-vs-sqlite3/
102109

110+
### 1,000,000 Rows Random Access Benchmark vs. C++ STL Map and HashMap
111+
112+
<p align="center">
113+
<a href="https://crossdb.org/blog/benchmark/crossdb-vs-stlmap/">
114+
<img src="https://crossdb.org/images/crossdb-vs-stlmap.png">
115+
</a>
116+
</p>
117+
118+
https://crossdb.org/blog/benchmark/crossdb-vs-stlmap/
119+
103120
### SQL Statements
104121

105122
https://crossdb.org/sql/statements/

bench/basic/Makefile

+41-5
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,52 @@ all:
33
./bench-crossdb
44

55
debug:
6-
$(CC) -o bench-crossdb bench-crossdb.c ../../src/crossdb.c -g -fsanitize=address
7-
./bench-crossdb
6+
$(CC) -o bench-crossdb bench-crossdb.c ../../src/crossdb.c -lpthread -g -fsanitize=address
7+
8+
gdb: debug
9+
gdb ./bench-crossdb
810

911
sqlite:
10-
$(CC) -o bench-sqlite bench-sqlite.c -O2 -lsqlite3
12+
$(CC) -o bench-sqlite bench-sqlite.c -O2 -lsqlite3 -lpthread
1113
./bench-sqlite
1214

15+
stlmap:
16+
$(CC) -o bench-stlmap bench-stlmap.cpp -std=c++17 -O2 -lpthread -lstdc++ -lm
17+
./bench-stlmap
18+
1319
fast:
14-
$(CC) -o bench-crossdb bench-crossdb.c ../../src/crossdb.c -O3 -march=native
20+
$(CC) -o bench-crossdb bench-crossdb.c ../../src/crossdb.c -O3 -march=native -lpthread
1521
./bench-crossdb
1622

23+
build:
24+
$(CC) -o bench-crossdb bench-crossdb.c -O2 -lcrossdb -lpthread
25+
$(CC) -o bench-sqlite bench-sqlite.c -O2 -lsqlite3 -lpthread
26+
$(CC) -o bench-stlmap bench-stlmap.cpp -std=c++17 -O2 -lpthread -lstdc++ -lm
27+
28+
test: build
29+
@echo
30+
@echo "\n***************** CrossDB *****************\n"
31+
@./bench-crossdb -q -j -r 5 -n 1000
32+
@./bench-crossdb -q -j -r 5 -n 10000
33+
@./bench-crossdb -q -j -r 5 -n 100000
34+
@./bench-crossdb -q -j -r 5 -n 1000000
35+
@./bench-crossdb -q -j -r 5 -n 10000000
36+
37+
@echo
38+
@echo "\n***************** STL Map & HashMap *****************\n"
39+
@./bench-stlmap -q -j -r 5 -n 1000
40+
@./bench-stlmap -q -j -r 5 -n 10000
41+
@./bench-stlmap -q -j -r 5 -n 100000
42+
@./bench-stlmap -q -j -r 5 -n 1000000
43+
@./bench-stlmap -q -j -r 5 -n 10000000
44+
45+
@echo
46+
@echo "\n***************** SQLite *****************\n"
47+
@./bench-sqlite -q -j -r 5 -n 1000
48+
@./bench-sqlite -q -j -r 5 -n 10000
49+
@./bench-sqlite -q -j -r 5 -n 100000
50+
@./bench-sqlite -q -j -r 5 -n 1000000
51+
@./bench-sqlite -q -j -r 5 -n 10000000
52+
1753
clean:
18-
rm -f a.out bench-crossdb bench-sqlite *.txt
54+
rm -f a.out bench-crossdb bench-sqlite bench-stlmap *.txt

0 commit comments

Comments
 (0)