Company
Date Published
Author
Marko Rajcevic
Word count
563
Language
English
Hacker News points
None

Summary

YugabyteDB supports composite keys and secondary indexes, which are used to uniquely identify table rows and allow efficient range scans. When creating an index, the primary key must be unique, but this is not a requirement for non-unique secondary indexes, which can lead to hotspots on tablets. To optimize query performance, it's essential to understand the cardinality of columns and order them correctly in composite indexes, and to use the correct sharding organization (hash or range) depending on the query type. YugabyteDB provides various resources, including blogs, video tutorials, and training sessions, to help users master its features and optimize their queries.