I have a composite primary key (col1+col2) both BigInt. And i am using NDB API to read from cluster. If i use both col1+col2 NDB API retrieves the row data.
Problem is that in one case where i pass just col1(part of primary key), and try to retreive all the rows from the table is not working.
Is there any direct way to read using native c++ MySQL NDB API with part of composite primary key, without using native ndb SCAN operations?
MySQL Cluster uses hash indexes as primary keys. This means that you need to provide the fully specified key for a primary key search via this hash index. By default there is always an ordered index created as well.
This can to be scanned using an index scan. There is no way out. At least you do not need to use a table scan.