Hello guys,
today I've stumbled upon problem with performance. I have such table:
CREATE TABLE DETAILS_DATA
(
ID_MASTER INTEGER NOT NULL,
ID_PARAM INTEGER NOT NULL,
PARAM_VALUE VARCHAR(64) NOT NULL
);
ALTER TABLE DETAILS_DATA ADD CONSTRAINT FK_DETAILS_DATA_ID_MASTER
FOREIGN KEY
You can use an index partially, but only if that part is the prefix of the rest
of the index. As ID_PARAM is the second part of the index, the index cannot be
used.
Either reverse the columns in the index definition, or create a separate index.
Note that given the name, I'd guess this should be
tries to create the table with a primary index:
CREATE TABLE DETAILS_DATA
(ID_MASTER INTEGER NOT NULL,
ID_PARAM INTEGER NOT NULL,
PARAM_VALUE VARCHAR(64) NOT NULL,
CONSTRAINT PK_DETAILS_DATA PRIMARY KEY (ID_MASTER,ID_PARAM));
---Messaggio originale---
Da: