Posts

Showing posts with the label distributedsql

CockroachDB TIL: Volume 10

Image
*This is my series of articles covering short "Today I learned" topics as I work with CockroachDB. Today, we're covering Previous articles Volume 1 Volume 2 Volume 3 Volume 4 Volume 5 Volume 6 Volume 7 Volume 8 Volume 9 Volume 10 Topics Topic 1: [Generating ULID strings in CockroachDB](#Topic 1: Generating ULID strings in CockroachDB) Topic 2: Enable CLI tab completion for column names Topic 1: Generating ULID strings in CockroachDB CockroachDB adopted ULID several releases ago as yet another version of UUID type. There is no explicity ULID type in CockroachDB. There are functions available to generate ULID in UUID format. So in case you need to generate lexicographically sortable IDs, you can use the built-in gen_random_ulid() function and there are a several conversion functions to convent from ULID to UUID i.e. ulid_to_uuid and vice versa, i.e. uuid_to_ulid . One point of friction in CockroachDB exists where one needs to generate an actua...

Experimenting with unique constraints in CockroachDB, MongoDB and FerretDB

Image

Migrating MongoDB collections to CockroachDB with FerretDB

Image

Using CockroachDB as a backend for OSS MongoDB alternative FerretDB

Image

CockroachDB TIL: Volume 8

Image
This is my series of articles covering short "Today I learned" topics as I work with CockroachDB. Today, we're covering how to generate workload data for CockroachDB for offline use, decode hex data into human-readable form, show all K/V pairs within the requested range, leverage pgpass utility with cockroach binary and getting table and database size in cockroach CLI. Previous articles Volume 1 Volume 2 Volume 3 Volume 4 Volume 5 Volume 6 Volume 7 Volume 8 Topics Topic 1: Generate workload data Topic 2: Convert hex keys to human-readable form Topic 3: Show all K/V pairs within the requested range Topic 4: Using pgpass with the cockroach binary Topic 5: Get table size from CLI Topic 1: Generate workload data The standard approach to generate workload data, say for tpcc workload has always been the following cockroach workload init tpcc "postgresql://user:password@127.0.0.1:26257?sslmode=require" This will generate the sample data a...

Using CockroachDB CDC with Confluent Cloud Kafka and Schema Registry

Image

CockroachDB TIL: Volume 6

Image
This is my series of articles covering short "Today I learned" topics as I work with CockroachDB. Previous articles Volume 1 Volume 2 Volume 3 Volume 4 Volume 5 Volume 6 Volume 7 Topics Topic 1: Cockroach Init container Topic 2: Chain column's schema changes into a single statement Topic 3: Turn off fsync (UNSAFE) Topic 4: Use pgpass with Java pgjdbc driver Topic 5: Avoid cruft with cockroach demo Topic 1: Cockroach Init container Use init container to initialize Cockroach and exit, you no longer need to explicitly run init when you bring up CockroachDB. version: '3.9' services: roach-0: container_name: roach-0 hostname: roach-0 image: cockroachdb/cockroach:v21.2.4 command : start --logtostderr=WARNING --log-file-verbosity=WARNING --insecure -- join =roach-0,roach-1,roach-2 --listen-addr=roach-0:26257 --advertise-addr=roach-0:26257 --max-sql-memory=.25 --cache=.25 ports: - 26257:26257 - 8080:8080 ...

Using CockroachDB workload with Kerberos

Image

Migrating feature toggles with Unleash and CockroachDB

Image

CockroachDB TIL: Volume 4

Image
This is a new series of articles covering short "Today I learned" topics as I peel the layers on CockroachDB. This is meant to resemble release notes. I decided to mix it up with the format for these posts as they may not justify an entire blog. Previous articles Volume 1 Volume 2 Volume 3 Volume 4 Volume 5 Volume 6 Volume 7 Topics Topic 1 Reset network and execution statistics in CLI This topic will cover what trivial misconfigurations may lead to if you don't keep client and server versions uniform. These mismatched versions may lead to unforseen consequences. This is one of those situations where a user reported missing info from their CLI. In this case, they were missing execution and network latency which we conveniently output after every query artem @free - tier.gcp - us - central1.cockroachlabs.cloud: 26257 / defaultdb > select * from results limit 1 ; id | city | type | owner...