Hello team! I need help to face my issue. I have the table T_CODA_ELABORAZIONE_POD
CREATE TABLE METERING.T_CODA_ELABORAZIONE_POD( ID_ENTRY_Q bigint(20) NOT NULL AUTO_INCREMENT, CODA VARCHAR(100), POD VARCHAR(20), ID_OPERATION numeric(10,0), TYPE_OPERATION varchar(100), DATAINSERIMENTO datetime, ISPROCESSED char(1) default '0', LOGMESSAGE Varchar(4000), DATAELABORAZIONE datetime, DATAINIZIALE date, CONSTRAINT T_CODA_ELABORAZIONE_POD_PK PRIMARY KEY (ID_ENTRY_Q) ) ;
that contains 16 million rows already on a customer installation. I would like to insert a new record into the table every time except when the POD already exists AND ISPROCESSED = ‘0’. What’s the most performing way to get that?