question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[CockroachDb] Investigate Partial Indices

See original GitHub issue

It seems like some partial indexes e.g. where x =5 do not seem to be correctly filtered out when introspected on CockroachDb vs on Postgres.

Example: https://github.com/prisma/database-schema-examples/blob/8cea37d834f3effd6aad53e98c5bc865b4d85335/postgres/canvas-lms/schema.sql#L13216

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:6 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
matthewmuellercommented, Dec 23, 2021

(Disregard if unrelated)

The current implementation of MongoDB uniques don’t behave the same as SQL with nullability. We’re currently trying to decide how to deal with this (needs a discussion with migrations team still). One suggestion was to actually support partial indices in Prisma: https://github.com/prisma/prisma-engines/issues/2361

0reactions
janpiocommented, Jan 6, 2022

Cockroach Cloud Serverless, which is showing this behavior, is currently running on a specific version that does not include the fix that Matthias mentioned. Next week it will be updated to a newer version, and we expect the problem to magically go away when that happens.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Partial Indexes | CockroachDB Docs
CockroachDB can use a partial index to efficiently execute queries on any subset of rows implied by the partial index. When possible, the...
Read more >
Chapter 4. CockroachDB SQL - O'Reilly
Indexes can be defined within the CREATE TABLE statement or by a separate CREATE INDEX statement. The structure of a database schema forms...
Read more >
Evaluation of CockroachDB in a cloud-native environment
CockroachDB stores all user data (tables, indexes, etc) and almost all system data in a large sorted map of key-value pairs. This keyspace...
Read more >
CockroachDB - Datadog Docs
Log collection · Collecting logs is disabled by default in the Datadog Agent. Enable it in datadog.yaml : logs_enabled: true · Add this...
Read more >
CockroachDB: the Definitive Guide
Get the lowdown on CockroachDB, the distributed SQL database built to handle the demands ... examine every index for every SSTable to find...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found