2

Given that CockroachDB is implemented with a KV store under the hood, including the table metadata. Would every INSERT or UPDATE also make a call to the table metadata under the hood?

Apologies for the dumb question, new to databases here!

Brian Shih
  • 301
  • 1
  • 8
  • can ou elaborate what you mean, basically a sql server will parse the code and run an optimizer, so it must use metadata – nbk Dec 18 '22 at 10:45

1 Answers1

2

Cockroach has a distributed metadata caching mechanism that it leverages to avoid reading system metadata while planning DML queries. The metadata will only need to be read if the query is the first time the gateway has seen a reference to that table.

ajwerner
  • 191
  • 3