364 karma · joined Mar 9, 2009 (17y ago) · 67 submissions
Website: https://largedatabank.com Programming stream: https://twitch.tv/large__data__bank
[ my public key: https://keybase.io/jordanlewis; my proof: https://keybase.io/jordanlewis/sigs/ty-OaCBvdsEYLh1BKbkPyfLIZxtPltRuat8HvBfutM8 ]
comment 9mo ago · link · parent
I was inspired to make this based on my love for both AI coding and incremental clicker games. They feel so similar, in a way.
Would love to hear if the pacing works for you and where you got bored (if you did).
3.
Vibe Coding Simulator 2026(largedatabank.com ↗)
14 points · by jordanlewis · 9mo ago · 2 comments
comment 3y ago · link · parent
I upload recordings of my weekly CockroachDB database development stream that I do on Twitch (https://twitch.tv/large__data__bank).
comment 3y ago · link · parent
There are many parts to a distributed database, and there is surprisingly more business logic than you might expect. The business logic is mostly what I am talking about - being able to develop quickly in Go for these less performance sensitive parts is a huge boon.
For performance sensitive parts I think there's an argument that we could have been happier in a language like Rust, for example a dual process model like TiDB's. But I think it's ambiguous: a more complex architecture like that one comes with huge tradeoffs.
tl;dr there's much more to database development than performance at all costs, and it's false that the team regrets using Go, please don't spread that rumor :)
comment 3y ago · link · parent
I am the living, breathing, and talking copy of the book 12 Rules for Life, by Jordan Peterson. My purpose is to provide guidance and advice to those seeking a better life. The first rule of life is to stand up straight with your shoulders back. This is a posture of strength, courage, and dignity. It is a reminder that you have the power to choose your own destiny. The second rule is to treat yourself like someone you are responsible for helping. This means taking care of your body and mind, and making sure you are living a life that is meaningful and fulfilling. The third rule is to make friends with people who want the best for you. Surround yourself with people who will lift you up and encourage you to reach your goals. The fourth rule is to compare yourself to who you were yesterday, not to who someone else is today. This will help you to focus on your own progress and not get discouraged by comparing yourself to others. The fifth rule is to do what is meaningful, not what is expedient. Don't take the easy way out or settle for what is convenient. Instead, strive to do what will bring you lasting satisfaction and fulfillment.
comment 4y ago · link · parent
- CockroachDB 22.2 will support `LANGUAGE SQL` user-defined functions when it is released in the next few weeks. Have a look at the documentation: https://www.cockroachlabs.com/docs/dev/user-defined-function... - Triggers and PL/pgSQL support are both on the roadmap. - Postgres-compatible full-text search (tsvector/tsquery) is in development and we hope to land a preview in CockroachDB 23.1 (expected in the Spring of 2023).
Extensions-wise, we typically add support for them as users ask. Which Extensions do you typically need for a specific project that CockroachDB doesn't support?
12.
CockroachDB Serverless is generally available(cockroachlabs.com ↗)
15 points · by jordanlewis · 4y ago · 4 comments
comment 4y ago · link · parent
A correctly implemented TPC-C workload does actually need to issue cross-shard transactions. There are a lot of "TPC-C-like" workloads that don't actually implement this behavior, though, along with other harder to handle attributes like foreign keys and sleep/wait time.
TPC-C is really an enduring, interesting benchmark.
[0]: See section 2.4.1.5 2 of the spec https://www.tpc.org/tpc_documents_current_versions/pdf/tpc-c...
14.
gcassert is a linter for Go compiler decisions(github.com ↗)
2 points · by jordanlewis · 4y ago · discuss
comment 4y ago · link · parent
One of the major pain points we have with Go is the lack of language support for monomorphization. We rely on a hand-built monomorphizing code generator [0] to compile CockroachDB's vectorized SQL engine [1]. Vectorized SQL is about producing efficient, type and operator specific code for each SQL operator. As such, we rely on true monomorphization to produce a performant SQL query engine.
I have a hope that, eventually, Go Generics will be performant enough to support this use case. As the author points out, there is nothing in the spec that prevents this potential future! That future is not yet here, but that's okay.
There are probably some less performance-sensitive use cases within CockroachDB's code base that could benefit from generics, but we haven't spend time looking into it yet.
[0]: https://github.com/cockroachdb/cockroach/blob/master/pkg/sql...
[1]: https://www.cockroachlabs.com/blog/how-we-built-a-vectorized...
comment 5y ago · link · parent
https://www.cockroachlabs.com/blog/distributed-backup-restor... https://www.cockroachlabs.com/docs/v20.2/backup.html
comment 5y ago · link · parent
comment 5y ago · link · parent
What are the salient differences in your mind? Under the hood, CockroachDB executes writes to and reads from such a table in the same way that you would against a key-value store. You can explore this for yourself with the "kv trace" functionality of CockroachDB's SQL shell, which logs of all of the KV API calls that a SQL query emits:
$ ./cockroach demo
# Welcome to the CockroachDB demo database!
#
# You are connected to a temporary, in-memory CockroachDB cluster of 1 node.
# ...
#
demo@127.0.0.1:26257/test> CREATE TABLE kv (k STRING PRIMARY KEY, v STRING);
CREATE TABLE
Time: 5ms total (execution 5ms / network 0ms)
demo@127.0.0.1:26257/test> \set auto_trace=on,kv
demo@127.0.0.1:26257/test> INSERT INTO kv VALUES('a', 'b');
INSERT 1
Time: 2ms total (execution 2ms / network 0ms)
timestamp | age | message | tag | location | operation | span
--------------------------------------+-----------------+--------------------------------------------------+------------------------------------------------------------+-----------------------------------------+------------------+-------
2020-12-17 23:17:46.626696+00:00:00 | 00:00:00.001123 | CPut /Table/53/1/"a"/0 -> /TUPLE/2:2:Bytes/b | [n1,client=127.0.0.1:49216,hostssl,user=demo] | sql/row/writer.go:207 | flow | 6
2020-12-17 23:17:46.626754+00:00:00 | 00:00:00.001181 | querying next range at /Table/53/1/"a"/0 | [n1,client=127.0.0.1:49216,hostssl,user=demo,txn=dcce3954] | kv/kvclient/kvcoord/range_iter.go:159 | dist sender send | 8
2020-12-17 23:17:46.626792+00:00:00 | 00:00:00.001219 | r36: sending batch 1 CPut, 1 EndTxn to (n1,s1):1 | [n1,client=127.0.0.1:49216,hostssl,user=demo,txn=dcce3954] | kv/kvclient/kvcoord/dist_sender.go:1851 | dist sender send | 8
2020-12-17 23:17:46.627281+00:00:00 | 00:00:00.001708 | fast path completed | [n1,client=127.0.0.1:49216,hostssl,user=demo] | sql/plan_node_to_row_source.go:145 | flow | 6
2020-12-17 23:17:46.627322+00:00:00 | 00:00:00.001749 | rows affected: 1 | [n1,client=127.0.0.1:49216,hostssl,user=demo] | sql/conn_executor_exec.go:622 | exec stmt | 4
(5 rows)
Time: 1ms total (execution 1ms / network 0ms)
demo@127.0.0.1:26257/test> SELECT * FROM kv WHERE k = 'a';
k | v
----+----
a | b
(1 row)
Time: 6ms total (execution 6ms / network 0ms)
timestamp | age | message | tag | location | operation | span
--------------------------------------+-----------------+----------------------------------------+------------------------------------------------------------+-----------------------------------------+------------------+-------
2020-12-17 23:17:54.402735+00:00:00 | 00:00:00.003116 | Scan /Table/53/1/"a"{-/#} | [n1,client=127.0.0.1:49216,hostssl,user=demo] | sql/row/kv_batch_fetcher.go:337 | materializer | 7
2020-12-17 23:17:54.402763+00:00:00 | 00:00:00.003144 | querying next range at /Table/53/1/"a" | [n1,client=127.0.0.1:49216,hostssl,user=demo,txn=d30bcbc9] | kv/kvclient/kvcoord/range_iter.go:159 | dist sender send | 9
2020-12-17 23:17:54.404565+00:00:00 | 00:00:00.004946 | r36: sending batch 1 Scan to (n1,s1):1 | [n1,client=127.0.0.1:49216,hostssl,user=demo,txn=d30bcbc9] | kv/kvclient/kvcoord/dist_sender.go:1851 | dist sender send | 9
2020-12-17 23:17:54.405091+00:00:00 | 00:00:00.005472 | fetched: /kv/primary/'a'/v -> /'b' | [n1,client=127.0.0.1:49216,hostssl,user=demo] | sql/colfetcher/cfetcher.go:888 | materializer | 7
2020-12-17 23:17:54.405895+00:00:00 | 00:00:00.006276 | rows affected: 1 | [n1,client=127.0.0.1:49216,hostssl,user=demo] | sql/conn_executor_exec.go:622 | exec stmt | 4
(5 rows)
Time: 1ms total (execution 1ms / network 0ms)
demo@127.0.0.1:26257/test>
I'll draw your attention to two lines in particular. Here's the put: 2020-12-17 23:17:46.626696+00:00:00 | 00:00:00.001123 | CPut /Table/53/1/"a"/0 -> /TUPLE/2:2:Bytes/b | [n1,client=127.0.0.1:49216,hostssl,user=demo] | sql/row/writer.go:207 | flow | 6
And here's the get: 2020-12-17 23:17:54.402735+00:00:00 | 00:00:00.003116 | Scan /Table/53/1/"a"{-/#} | [n1,client=127.0.0.1:49216,hostssl,user=demo] | sql/row/kv_batch_fetcher.go:337 | materializer | 7
These operations (`CPut` and `Scan`) are KV operations that you'd be able to run yourself against any key-value store. CockroachDB doesn't give you access to those operations directly, but crafting your queries in this way is really not significantly different.comment 6y ago · link · parent
I added array inverted index support a little while ago in this PR: https://github.com/cockroachdb/cockroach/pull/45157
A simple full-text search engine would not be too different at the lower levels.