跳转到正文

Docker 验证证据 ​

CockroachDB 已验证 · Verified 🕒 快照采集: 2026-08-23 15:15:53 UTC
🐳 镜像:server:由 COCKROACHDB_IMAGE 锁定
🛠️ 关键工具:cockroach
🚀 运行/交互CREATE TABLE → INSERT → SELECT → SHOW TABLES → EXPLAIN
docker-session.out.txt
$ cockroach sql --insecure --host localhost:26257 -e "SELECT 1"
?column?
1

$ cockroach sql --insecure -e fixed-session.sql
DROP TABLE
CREATE TABLE
INSERT 0 3
id	name	score
3	Carol	40
1	Alice	30
schema_name	table_name	type	owner	estimated_row_count	locality
public	hello_items	table	root	NULL	NULL
info
distribution: local
vectorized: true

• filter
│ filter: score >= 30
│
└── • scan
"      missing stats"
"      table: hello_items@hello_items_pkey"
"      spans: FULL SCAN"

index recommendations: 1
1. type: index creation
"   SQL command: CREATE INDEX ON defaultdb.public.hello_items (score) STORING (name);"
NOTICE: auto-committing transaction before processing DDL due to autocommit_before_ddl setting

Released under the MIT License.