# CockroachDB

**URL:** https://forum.cockroachlabs.com/c/cockroachdb/7.md?page=1

[Latest](https://forum.cockroachlabs.com/latest.md) · [Categories](https://forum.cockroachlabs.com/categories.md) · [Tags](https://forum.cockroachlabs.com/tags.md)

**Page:** 2

---

## [Could Someone Give me Advice for Optimizing CockroachDB Performance in High-Throughput Applications?](https://forum.cockroachlabs.com/t/could-someone-give-me-advice-for-optimizing-cockroachdb-performance-in-high-throughput-applications/6164)

<div class="topic-metadata">

**Author:** [@Padrickk](https://forum.cockroachlabs.com/u/Padrickk)\
**Replies:** 3\
**Last updated:** [December 9, 2024, 10:08am UTC](https://forum.cockroachlabs.com/t/could-someone-give-me-advice-for-optimizing-cockroachdb-performance-in-high-throughput-applications/6164 "2024-12-09T10:08:00Z")

</div>

Hello there, I am working on a project where we are using CockroachDB as our primary database for a high through put application. We are experiencing some performance challenges and I am reaching out to the community to…

---

## [Transaction isolation levels: which statement is true?](https://forum.cockroachlabs.com/t/transaction-isolation-levels-which-statement-is-true/6944)

<div class="topic-metadata">

**Author:** [@tk35c](https://forum.cockroachlabs.com/u/tk35c)\
**Replies:** 4\
**Last updated:** [December 3, 2024, 8:00am UTC](https://forum.cockroachlabs.com/t/transaction-isolation-levels-which-statement-is-true/6944 "2024-12-03T08:00:23Z")

</div>

Hello. In your documentation is stated that, by default, CockroachDB runs in SERIALIZABLE mode as shown in but, in READ COMMITTED section it’s stated that by default READ COMMITTED mode is enabled, as shown in an…

---

## [Help to understand the metrics](https://forum.cockroachlabs.com/t/help-to-understand-the-metrics/6942)

<div class="topic-metadata">

**Author:** [@tk35c](https://forum.cockroachlabs.com/u/tk35c)\
**Replies:** 4\
**Last updated:** [November 28, 2024, 12:28pm UTC](https://forum.cockroachlabs.com/t/help-to-understand-the-metrics/6942 "2024-11-28T12:28:41Z")

</div>

Hello. In my company I’m currently evaluating CockroachDB and I need some clarifications about the metrics shown in the UI. In particular, the number of writes shown in the picture below: My test application is a S…

---

## [List all nodes in subjectaltname of certificate?](https://forum.cockroachlabs.com/t/list-all-nodes-in-subjectaltname-of-certificate/6938)

<div class="topic-metadata">

**Author:** [@gonedaddy1](https://forum.cockroachlabs.com/u/gonedaddy1)\
**Replies:** 1\
**Last updated:** [November 25, 2024, 7:10pm UTC](https://forum.cockroachlabs.com/t/list-all-nodes-in-subjectaltname-of-certificate/6938 "2024-11-25T19:10:30Z")

</div>

Doing a new install of 24.3.0-rc1 on-prem with 3 nodes and using OpenSSL for certificate creation. When creating the node certs, can I include all the node names (db1, db2, db3) as DNS: entries on the subjectaltname lin…

---

## [Getting issue in Cockroach DB cluster](https://forum.cockroachlabs.com/t/getting-issue-in-cockroach-db-cluster/6152)

<div class="topic-metadata">

**Author:** [@Sagarbud](https://forum.cockroachlabs.com/u/Sagarbud)\
**Replies:** 1\
**Last updated:** [October 28, 2024, 3:08pm UTC](https://forum.cockroachlabs.com/t/getting-issue-in-cockroach-db-cluster/6152 "2024-10-28T15:08:58Z")

</div>

Hello All, We have setup three node Cockroach-DB cluster(version: 22.2.14) on GKE kubernetes cluster on GCP using Helm. Helm chart version is 6.0.3. Suddenly, we’re getting below error on Cockroach-DB pod’s. Also, Cockr…

---

## [Creation of cluster](https://forum.cockroachlabs.com/t/creation-of-cluster/5886)

<div class="topic-metadata">

**Author:** [@Jayesh\_Ashok\_Jain](https://forum.cockroachlabs.com/u/Jayesh_Ashok_Jain)\
**Replies:** 1\
**Last updated:** [October 7, 2024, 9:33pm UTC](https://forum.cockroachlabs.com/t/creation-of-cluster/5886 "2024-10-07T21:33:39Z")

</div>

Hello Team, I am trying to install 2 nodes cluster for cockroach. Followed the steps and created the certs on node1 wth following steps : Node 1 : cockroach cert create-ca --certs-dir=/opt/cockroachdb/certs --ca-key=…

---

## [How does cockroachdb count vCPUs?](https://forum.cockroachlabs.com/t/how-does-cockroachdb-count-vcpus/6171)

<div class="topic-metadata">

**Author:** [@Colm](https://forum.cockroachlabs.com/u/Colm)\
**Replies:** 2\
**Last updated:** [October 2, 2024, 7:10pm UTC](https://forum.cockroachlabs.com/t/how-does-cockroachdb-count-vcpus/6171 "2024-10-02T19:10:06Z")

</div>

On the console overview page, there is a list of Nodes that shows a count of vCPUs per each node. The manual describes this number as “Number of vCPUs on the machine.”: What exactly does the “machine” refer to here? W…

---

## [Cockroach db database with single node](https://forum.cockroachlabs.com/t/cockroach-db-database-with-single-node/6162)

<div class="topic-metadata">

**Author:** [@vishalzuru](https://forum.cockroachlabs.com/u/vishalzuru)\
**Replies:** 3\
**Last updated:** [August 29, 2024, 12:49pm UTC](https://forum.cockroachlabs.com/t/cockroach-db-database-with-single-node/6162 "2024-08-29T12:49:42Z")

</div>

We have cockroach db databases running in three environments: development, stage, and production. We have deployed the cockroach database on AWS EC2 virtual machines. We have three virtual machines running in stage and p…

---

## [How to speed up inserts](https://forum.cockroachlabs.com/t/how-to-speed-up-inserts/6160)

<div class="topic-metadata">

**Author:** [@AlexCologne](https://forum.cockroachlabs.com/u/AlexCologne)\
**Replies:** 1\
**Last updated:** [August 26, 2024, 6:47pm UTC](https://forum.cockroachlabs.com/t/how-to-speed-up-inserts/6160 "2024-08-26T18:47:32Z")

</div>

I have a cockroach db with 3 nodes and the following table structure: CREATE TABLE public.urls ( id INT8 NOT NULL GENERATED ALWAYS AS IDENTITY, url VARCHAR NULL, CONSTRAINT urls\_pk PRIMARY KEY (id ASC), UNIQUE I…

---

## [Cockroach db vm auto scaling AWS](https://forum.cockroachlabs.com/t/cockroach-db-vm-auto-scaling-aws/6157)

<div class="topic-metadata">

**Author:** [@vishalzuru](https://forum.cockroachlabs.com/u/vishalzuru)\
**Replies:** 3\
**Last updated:** [August 21, 2024, 4:24pm UTC](https://forum.cockroachlabs.com/t/cockroach-db-vm-auto-scaling-aws/6157 "2024-08-21T16:24:59Z")

</div>

I set up the cockroach database on an Amazon Web Services virtual machine. I created three m6i.large virtual machines with two CPUs and eight gigabytes of RAM per node. Cockroach database performs admirably on the nodes.…

---

## [How to use cockroach demo in a docker container?](https://forum.cockroachlabs.com/t/how-to-use-cockroach-demo-in-a-docker-container/6156)

<div class="topic-metadata">

**Author:** [@sean\_phoenix](https://forum.cockroachlabs.com/u/sean_phoenix)\
**Replies:** 1\
**Last updated:** [July 31, 2024, 1:48pm UTC](https://forum.cockroachlabs.com/t/how-to-use-cockroach-demo-in-a-docker-container/6156 "2024-07-31T13:48:25Z")

</div>

I’m trying to use some enterprise features in a CI pipeline, so going with cockroach demo, which runs within a docker container, but having trouble connecting to it. Even trying to replicate on my local machine (still u…

---

## [Cockroach Support](https://forum.cockroachlabs.com/t/cockroach-support/6155)

<div class="topic-metadata">

**Author:** [@sean\_phoenix](https://forum.cockroachlabs.com/u/sean_phoenix)\
**Replies:** 2\
**Last updated:** [July 19, 2024, 9:29pm UTC](https://forum.cockroachlabs.com/t/cockroach-support/6155 "2024-07-19T21:29:25Z")

</div>

Your support links are down Join the CockroachDB Slack community | Cockroach Labs Are there no higher level support tiers? How do I have cockroach dedicated, declare an incident in production, and it marks it as P4 low …

---

## [Is a table with 5 billion records be feasible in cockroachDB?](https://forum.cockroachlabs.com/t/is-a-table-with-5-billion-records-be-feasible-in-cockroachdb/6154)

<div class="topic-metadata">

**Author:** [@mishranitin2003](https://forum.cockroachlabs.com/u/mishranitin2003)\
**Replies:** 1\
**Last updated:** [July 15, 2024, 9:20pm UTC](https://forum.cockroachlabs.com/t/is-a-table-with-5-billion-records-be-feasible-in-cockroachdb/6154 "2024-07-15T21:20:16Z")

</div>

I have a table to contain around 5 billion records. Below is a structure of table: id INT8 PRIMARY KEY, col1 INT8 NOT NULL, col2 INT8 NOT NULL, col3 STRING NULL, col4 STRING NULL, col5 INT8 NULL, col6 JSONB NULL, …

---

## [Potential Memory Leak v23.2](https://forum.cockroachlabs.com/t/potential-memory-leak-v23-2/6103)

<div class="topic-metadata">

**Author:** [@Aris](https://forum.cockroachlabs.com/u/Aris)\
**Replies:** 16\
**Last updated:** [July 1, 2024, 12:00pm UTC](https://forum.cockroachlabs.com/t/potential-memory-leak-v23-2/6103 "2024-07-01T12:00:08Z")

</div>

Hello, We have been running a small Cockroach cluster v22.1 for a couple of years now without any issues whatsoever. However, recently we upgraded the cluster to version 23.2.0 and immediately started noticing a slow bu…

---

## [Migration from PostgreSQL managed by peewee](https://forum.cockroachlabs.com/t/migration-from-postgresql-managed-by-peewee/6148)

<div class="topic-metadata">

**Author:** [@0xC4DE](https://forum.cockroachlabs.com/u/0xC4DE)\
**Replies:** 4\
**Last updated:** [June 28, 2024, 9:20pm UTC](https://forum.cockroachlabs.com/t/migration-from-postgresql-managed-by-peewee/6148 "2024-06-28T21:20:43Z")

</div>

Hello. I’m currently migrating a data base from MySQL → Postgresql → Cockroach (locally hosted). The reason for the intermediary step is because we wish to support both Postgres & Cockroach, managed by Peewee ORM, using …

---

## [Iterate resultset in cursor](https://forum.cockroachlabs.com/t/iterate-resultset-in-cursor/6142)

<div class="topic-metadata">

**Author:** [@Kapase](https://forum.cockroachlabs.com/u/Kapase)\
**Replies:** 1\
**Last updated:** [June 25, 2024, 3:13pm UTC](https://forum.cockroachlabs.com/t/iterate-resultset-in-cursor/6142 "2024-06-25T15:13:59Z")

</div>

I have created store procedure, inside store procedure I want to iterate result of query. is it possible? I tried using cursor but getting error at line of fetch… CREATE OR REPLACE PROCEDURE test\_cursor() AS $$ DECLA…

---

## [Crdb\_region based on Foreign key](https://forum.cockroachlabs.com/t/crdb-region-based-on-foreign-key/6140)

<div class="topic-metadata">

**Author:** [@kaiyoto](https://forum.cockroachlabs.com/u/kaiyoto)\
**Replies:** 1\
**Last updated:** [June 24, 2024, 2:56pm UTC](https://forum.cockroachlabs.com/t/crdb-region-based-on-foreign-key/6140 "2024-06-24T14:56:50Z")

</div>

Is it possible to have crdb\_region be determined based on a foreign key? For example: Users Id | Name | crdb\_region 1 | Joe | USA 2 | Doe | Europe Posts Id | User\_Id | Content 1 | 1 | Hello 2 | 1 | Hi! 3 | 1 | M…

---

## [CDC to Google Pub/Sub - Message Attributes](https://forum.cockroachlabs.com/t/cdc-to-google-pub-sub-message-attributes/6138)

<div class="topic-metadata">

**Author:** [@CBOS](https://forum.cockroachlabs.com/u/CBOS)\
**Replies:** 2\
**Last updated:** [June 17, 2024, 9:34pm UTC](https://forum.cockroachlabs.com/t/cdc-to-google-pub-sub-message-attributes/6138 "2024-06-17T21:34:55Z")

</div>

Hello - I’m experimenting with implementing a CDC stream to Google Pub/Sub. Is it possible to configure the message that gets sent to the topic, specifically, the attributes parameter? This can be used in Pub/Sub to filt…

---

## [SQL Activity page not showing all slow queries](https://forum.cockroachlabs.com/t/sql-activity-page-not-showing-all-slow-queries/6134)

<div class="topic-metadata">

**Author:** [@Colm](https://forum.cockroachlabs.com/u/Colm)\
**Replies:** 3\
**Last updated:** [June 17, 2024, 9:47am UTC](https://forum.cockroachlabs.com/t/sql-activity-page-not-showing-all-slow-queries/6134 "2024-06-17T09:47:40Z")

</div>

Hi My console is showing strange behaviour on the SQL Activity page. The first image below shows a 5 minute time window, and the slowest query is 75.2s. The next image shows a 24hr window on the same day, but the 75.2s …

---

## [Full scan for min/max in group by with index](https://forum.cockroachlabs.com/t/full-scan-for-min-max-in-group-by-with-index/6118)

<div class="topic-metadata">

**Author:** [@barsv](https://forum.cockroachlabs.com/u/barsv)\
**Replies:** 5\
**Last updated:** [May 15, 2024, 2:29pm UTC](https://forum.cockroachlabs.com/t/full-scan-for-min-max-in-group-by-with-index/6118 "2024-05-15T14:29:30Z")

</div>

Hi, I have the following SQL: -- create a table with 2 columns drop table if exists t; create table t (a int, b int); -- insert 1 000 000 rows to have some data INSERT INTO t (a, b) SELECT x % 100, (x % 100) \* 10 + (x …

---

## [Multi-cluster deployment using Istio](https://forum.cockroachlabs.com/t/multi-cluster-deployment-using-istio/4056)

<div class="topic-metadata">

**Author:** [@pup\_seba](https://forum.cockroachlabs.com/u/pup_seba)\
**Replies:** 1\
**Last updated:** [May 6, 2024, 5:42pm UTC](https://forum.cockroachlabs.com/t/multi-cluster-deployment-using-istio/4056 "2024-05-06T17:42:30Z")

</div>

Hi, Is there any guide on how to deploy multicluster using Istio? Istio is already in place between 2 clusters and replicated control planes are working as expected. Idea would be to have 2 statefulsets (one on each clu…

---

## [Cluster and nodes](https://forum.cockroachlabs.com/t/cluster-and-nodes/6106)

<div class="topic-metadata">

**Author:** [@sansknowledge](https://forum.cockroachlabs.com/u/sansknowledge)\
**Replies:** 1\
**Last updated:** [April 8, 2024, 10:28pm UTC](https://forum.cockroachlabs.com/t/cluster-and-nodes/6106 "2024-04-08T22:28:15Z")

</div>

Hi, I am very fresh to cockroachdb. I am having a windows network system with multiple system. on two systems of windows 10 os and windows server 2019 with different ip address and pingable and telnet enabled. both the …

---

## [SQL statements analysis](https://forum.cockroachlabs.com/t/sql-statements-analysis/3589)

<div class="topic-metadata">

**Author:** [@pvanek](https://forum.cockroachlabs.com/u/pvanek)\
**Replies:** 3\
**Last updated:** [April 3, 2020, 8:17pm UTC](https://forum.cockroachlabs.com/t/sql-statements-analysis/3589 "2020-04-03T20:17:11Z")

</div>

hi all, are there some tools, system views, tables to see following things for SQL statements? all sql statements parsed or executed like e.g. Oracle’s V$SQLAREA V$SQLAREA - Oracle - SS64.com to see real execution pl…

---

## [Join between global and regional table](https://forum.cockroachlabs.com/t/join-between-global-and-regional-table/6096)

<div class="topic-metadata">

**Author:** [@tuk](https://forum.cockroachlabs.com/u/tuk)\
**Replies:** 3\
**Last updated:** [March 18, 2024, 6:42pm UTC](https://forum.cockroachlabs.com/t/join-between-global-and-regional-table/6096 "2024-03-18T18:42:57Z")

</div>

I was checking cockroach DB for one of our requirements. I have not gone through the entire documentation of the cockroach DB yet. At very high level our requirement is something like below We want some our tables to b…

---

## [Create function: lexical error: unterminated string](https://forum.cockroachlabs.com/t/create-function-lexical-error-unterminated-string/6087)

<div class="topic-metadata">

**Author:** [@mattdba](https://forum.cockroachlabs.com/u/mattdba)\
**Replies:** 3\
**Last updated:** [March 7, 2024, 4:30pm UTC](https://forum.cockroachlabs.com/t/create-function-lexical-error-unterminated-string/6087 "2024-03-07T16:30:08Z")

</div>

I am new to crdb and am going through the examples. For the example “Create a function that uses a loop” I get this error: ERROR: parsing statement 1: lexical error: unterminated string SQLSTATE: 42601 DETAIL: source SQ…

---

## [Using CockroachDB with PowerDNS - configuration script changes](https://forum.cockroachlabs.com/t/using-cockroachdb-with-powerdns-configuration-script-changes/6093)

<div class="topic-metadata">

**Author:** [@gonedaddy1](https://forum.cockroachlabs.com/u/gonedaddy1)\
**Replies:** 2\
**Last updated:** [March 7, 2024, 3:08am UTC](https://forum.cockroachlabs.com/t/using-cockroachdb-with-powerdns-configuration-script-changes/6093 "2024-03-07T03:08:56Z")

</div>

Is anybody using CockroachDB as a backend DNS database? The PowerDNS docs say it will work, but some changes have to be made. Looking at their changes, I’m not sure if what they are saying is accurate anymore. For refere…

---

## [What happens when there is not enough replicas to write the transaction record to?](https://forum.cockroachlabs.com/t/what-happens-when-there-is-not-enough-replicas-to-write-the-transaction-record-to/6085)

<div class="topic-metadata">

**Author:** [@sreyan32](https://forum.cockroachlabs.com/u/sreyan32)\
**Replies:** 1\
**Last updated:** [February 15, 2024, 8:57pm UTC](https://forum.cockroachlabs.com/t/what-happens-when-there-is-not-enough-replicas-to-write-the-transaction-record-to/6085 "2024-02-15T20:57:43Z")

</div>

Hi, I am trying to get an intuition for what happens during a distributed transaction under the hood. Specifically when there is not enough replicas to write the transaction record to. Suppose I only have 2 nodes in my…

---

## [Approaches to code tables](https://forum.cockroachlabs.com/t/approaches-to-code-tables/6076)

<div class="topic-metadata">

**Author:** [@gdr](https://forum.cockroachlabs.com/u/gdr)\
**Replies:** 1\
**Last updated:** [February 9, 2024, 10:30pm UTC](https://forum.cockroachlabs.com/t/approaches-to-code-tables/6076 "2024-02-09T22:30:59Z")

</div>

This is a question on how best to approach supporting code tables, in particular their impact on indices and efficiency in searching. While I could certainly take the approach of “try something out and see how it perfor…

---

## [Count taking too long for a table with billion entries](https://forum.cockroachlabs.com/t/count-taking-too-long-for-a-table-with-billion-entries/6005)

<div class="topic-metadata">

**Author:** [@robertv](https://forum.cockroachlabs.com/u/robertv)\
**Replies:** 1\
**Last updated:** [September 15, 2023, 3:43pm UTC](https://forum.cockroachlabs.com/t/count-taking-too-long-for-a-table-with-billion-entries/6005 "2023-09-15T15:43:04Z")

</div>

Hello here, I am using CockroachDB in v21.2 , i have a table with more than a billion entries (~1.4Billion and planned to have 2 or 3 billion later) when i try an explain request, it is saying that it is based on auto …

---

## [Rename multiple databases during restore](https://forum.cockroachlabs.com/t/rename-multiple-databases-during-restore/6068)

<div class="topic-metadata">

**Author:** [@Surykant](https://forum.cockroachlabs.com/u/Surykant)\
**Replies:** 1\
**Last updated:** [January 3, 2024, 9:36pm UTC](https://forum.cockroachlabs.com/t/rename-multiple-databases-during-restore/6068 "2024-01-03T21:36:52Z")

</div>

I know we can use new\_db\_name option to rename the database during restore. is it possible to rename multiple databases during restore in the command below? restore database test\_db\_1, test\_db\_2 from latest in “s3://myb…

[Previous page](https://forum.cockroachlabs.com/c/cockroachdb/7.md)

[Next page](https://forum.cockroachlabs.com/c/cockroachdb/7.md?page=2)
