Re: Time-out problem
Sorry I pass the table from the test database, this is the correct spd_unit:
CREATE TABLE `spd_unit` (
`id_unit` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(128) NOT NULL,
`description` text,
`price` double(12,4) NOT NULL DEFAULT '0.0000',
`fk_id_ad` int(11) NOT NULL,
`fk_id_feed_xml` int(11) NOT NULL,
`fk_id_ad_format` int(11) NOT NULL,
`fk_id_type_unit` int(11) NOT NULL,
`last_contact` date NOT NULL,
`duration_time` int(11) NOT NULL,
`media` varchar(2048) NOT NULL,
`site_host` varchar(128) DEFAULT NULL,
`url_redirect` varchar(256) DEFAULT NULL,
`options` text,
`sku` varchar(40) DEFAULT NULL,
`cookie_duration` int(11) DEFAULT '0',
`cpa` double(5,2) DEFAULT '0.00',
`id_store` varchar(15) DEFAULT NULL,
`original_price` double DEFAULT NULL,
`installment` varchar(64) DEFAULT NULL,
PRIMARY KEY (`id_unit`),
KEY `t_anuncio_t_pecas_fk` (`fk_id_ad`),
KEY `fk_id_ad_format` (`fk_id_ad_format`),
KEY `xml` (`fk_id_feed_xml`),
KEY `fk_id_type_unit` (`fk_id_type_unit`),
CONSTRAINT `spd_unit_ibfk_1` FOREIGN KEY (`fk_id_ad_format`) REFERENCES `spd_ad_format` (`id_ad_format`) ON DELETE NO ACTION ON UPDATE NO ACTION,
CONSTRAINT `spd_unit_ibfk_2` FOREIGN KEY (`fk_id_feed_xml`) REFERENCES `spd_feed_xml` (`id_feed_xml`) ON DELETE NO ACTION ON UPDATE NO ACTION,
CONSTRAINT `spd_unit_ibfk_3` FOREIGN KEY (`fk_id_type_unit`) REFERENCES `spd_type_unit` (`id_type_unit`) ON DELETE NO ACTION ON UPDATE NO ACTION,
CONSTRAINT `t_anuncio_t_pecas_fk` FOREIGN KEY (`fk_id_ad`) REFERENCES `spd_ad` (`id_ad`) ON DELETE NO ACTION ON UPDATE NO ACTION
) ENGINE=InnoDB AUTO_INCREMENT=4589404 DEFAULT CHARSET=latin1
Now I have more 4.000.000 lines in this table, and no have duplicated fk