Questions tagged [cockroachdb]

A scalable, geo-replicated, transactional SQL datastore developed in Go.

CockroachDB is a scalable, geo-replicated, transactional SQL datastore being developed in .

References:

435 questions
0
votes
2 answers

Consecutive streaks/non-streaks based on Win, Draw & Loss grouped by team

I am trying to calculate streaks across a result database based on win loss and draw criteria. Goal: Get longest streak of wins/non-wins grouped by team I have tried different SQL query suggestions from other threads, but I am either missing out the…
0
votes
0 answers

Container is Exiting on start

Following the Getting Started guide for Starting a Local Cluster in Docker https://www.cockroachlabs.com/docs/stable/start-a-local-cluster-in-docker.html. The problem is that the container immediately exits. Tried adding tail -f /dev/null but it…
Jeremy Schaffer
  • 428
  • 4
  • 9
0
votes
1 answer

How can I alter column type from int8 to bytes in cockroachdb?

I have a very simple table namely: CREATE TABLE test( id INT PRIMARY KEY DEFAULT unique_rowid() ) And I want to change id type to bytes so that I can SET DEFAULT uuid_v4();. However if I run this sql: ALTER TABLE test MODIFY id bytes; I'm…
Disciples
  • 662
  • 1
  • 6
  • 15
0
votes
1 answer

How to check max-sql-memory and cache settings for an already running instance of cockroach db?

I have a cockroachdb instance running in production and would like to know the settings for the --max-sql-memory and --cache specified when the database was started. I am trying to enhance performance by following this production checklist but I am…
Anshuman Tiwari
  • 424
  • 9
  • 19
0
votes
1 answer

Issue while creating primary key from gorm model

While creating primary key from gorm model it return with error “duplicate column name: “id”” my model looks like type User struct { gorm.Model Id string gorm:"primary_key;" FirstName string LastName string } any idea what is the issue with…
Muhammad Habib
  • 111
  • 1
  • 12
0
votes
1 answer

column reference xxx is ambiguous (candidates: excluded.xxx,table.xxx) in upsert statement

I would like to perform upsert sql statement in cockroach DB. I would like to insert row into table when specific id does not exist in table and update name column when id with given value exist in table. Table definition: CREATE TABLE IF NOT…
spruser
  • 13
  • 3
0
votes
1 answer

Multi Region not connected everywhere

I would like to be able to use cockroach DB in multiple DC. 20 zones and after that it will increase. I would like to know if it's possible to have the data everywhere, but i dont want to be connected to every zones. I'm using multiple VPN and i'm…
haplo37
  • 3
  • 1
0
votes
2 answers

Can't add node to the cockroachde cluster

I'm staking to join a CockroachDB node to a cluster. I've created first cluster, then try to join 2nd node to the first node, but 2nd node created new cluster as follows. Does anyone knows whats are wrong steps on the following my steps, any…
Ueda Takeyuki
  • 721
  • 10
  • 26
0
votes
1 answer

How do I make my admin ui of cockroachdb publicly available via traefik ingress controller on kubernetes?

Kubernetes dedicated cockroachdb node - accessing admin ui via traefik ingress controller fails - page isn't redirecting properly I have a dedicated kubernetes node running cockroachdb. The pods get scheduled and everything is setup. I want to…
krjw
  • 4,070
  • 1
  • 24
  • 49
0
votes
1 answer

how to get a client key and client root cert for connecting to CockroachDB from Java client

I have deployed a CockroachDB single instance cluster in my Kubernetes cluster on DO following this link https://www.cockroachlabs.com/docs/stable/orchestrate-a-local-cluster-with-kubernetes.html. I followed this link to generate a server.crt file…
Katlock
  • 1,200
  • 1
  • 17
  • 41
0
votes
1 answer

How to fetch the date from epoch in CockroachDB

I have a column which has the time stamp stored in epoch. I need to fetch the date from the epoch time stamp. For instance for epoch = 1552942715, I need to fetch the date as 1552867200. How can this be achieved?
Vasanti
  • 1,207
  • 2
  • 12
  • 24
0
votes
1 answer

Is there a better explanation of reads/writes for cockroachdb?

Background: I come from many years of Oracle experience. About 3 years ago, started down the distributed path with Cassandra/DSE. I have a very good grasp on Cassandra. Over the past month, I have heard cockroachdb mentioned several times. So now,…
Jim Wartnick
  • 1,974
  • 1
  • 9
  • 19
0
votes
2 answers

Run TPCC on local cockroachdb cluster

I have a local cockroachdb up and running by following instructions from https://www.cockroachlabs.com/docs/stable/start-a-local-cluster.html I am trying to run the tpcc benchmark following the instructions from…
user3334213
  • 53
  • 1
  • 5
0
votes
1 answer

pq: cluster version does not support JSONB (>= 2.0 required)

We are using CockroachDB. We are trying to "import" a .sql dump file using command cockroach sql --database=database name < file-name.sql --insecure After pressing the enter the tables without Jsonb are created in the database and throwing an…
Bharath Kuppala
  • 176
  • 1
  • 3
  • 14
0
votes
1 answer

select bottleneck and insert into select doesn't work on cockroach db

I have to union 2 tables like below query. and 'table2' has 15GB data. But it show errors. I set max-sql-memory=.80 and I don't know how to solve this. When I execute this query with limit 50000 option, it works! Even 'select * from table2' shows…
hyona kim
  • 3
  • 1