Star us on Github
Join us on Slack
Start Now
YugabyteDB Managed
Try our fully managed cloud DBaaS for free.
No credit card required
Sign up
YugabyteDB
Try our open source distributed SQL database on your laptop.
Download
Products
YugabyteDB
The open source distributed SQL database
YugabyteDB Anywhere
Self-managed cloud DBaaS
YugabyteDB Managed
Fully managed cloud DBaaS
Integrations
FAQ
Releases
YugabyteDB
YugabyteDB Anywhere
YugabyteDB Managed
YugabyteDB Voyager
v2.17
Preview
v2.18
STS
v2.17
Preview
v2.16
STS
v2.14
LTS
v2.12
v2.8
Unsupported versions
Home
Explore
Indexes and constraints
Indexes and constraints
Explore indexes and constraints in YSQL and YCQL
Contribute
Report a doc issue
Suggest new content
Edit this page
Contributor guide
Primary keys
Explore the use of Primary keys in YSQL and YCQL with examples.
Foreign keys
Explore the use of Foreign keys associated with Primary keys in YSQL.
Secondary indexes
Explore Indexes to optimize your database performance.
Unique indexes
Explore Unique indexes in YSQL and YCQL with examples.
Partial indexes
Explore Partial indexes in YSQL and YCQL with examples.
Expression indexes
Explore Expression indexes in YSQL with examples.
Covering indexes
Explore Covering indexes in YSQL with examples.
GIN indexes
Use GIN indexes in YSQL to run efficient queries.
Other constraints
Explore CHECK, UNIQUE, and NOT NULL constraints to optimize your database performance.