[firebird-support] Is it possible to use only part of the index?

2015-07-17 Thread brucedickin...@wp.pl [firebird-support]
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

Re: [firebird-support] Is it possible to use only part of the index?

2015-07-17 Thread 'Mark Rotteveel' m...@lawinegevaar.nl [firebird-support]
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

Rif: [firebird-support] Is it possible to use only part of the index?

2015-07-17 Thread 'Raffaele Confalone' r.confal...@libero.it [firebird-support]
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: