composite column for primary key in cluster
Hi,
Are composite primary keys efficient in mysql cluster?
This is script:
--------------------
CREATE TABLE `Table1` (
`CONTS_ID` varchar(20) NOT NULL,
`ASSET_ID` varchar(20) NOT NULL,
`EFCT_START_DT` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
`EFCT_END_DT` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
`INSRT_USER_ID` varchar(10) DEFAULT NULL,
`INSRT_DT` timestamp NULL DEFAULT NULL,
`UPDT_USER_ID` varchar(10) DEFAULT NULL,
`UPDT_DT` timestamp NULL DEFAULT NULL,
`ASSET_TYPE_CD` varchar(2) NOT NULL,
PRIMARY KEY (`CONTS_ID`,`ASSET_ID`,`EFCT_START_DT`,`EFCT_END_DT`)
) ENGINE=NDBCLUSTER DEFAULT CHARSET=utf8;
-----------------------
I just changed storeage from innodb to ndbcluster.
Some queries can't use the primary key for join tables and explain result is full scan .
Are composite primary keys good for mysql cluster?
Subject
Views
Written By
Posted
composite column for primary key in cluster
2177
February 11, 2015 12:14AM
886
February 18, 2015 06:37PM
771
February 22, 2015 07:37PM
Sorry, you can't reply to this topic. It has been closed.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion
of Oracle or any other party.