Re: Querying Using All Cores
Thanks Phill.
The thing is, when I see the query running in 5 seconds instead of 25, you can imagine I got very excited. The outputs of the two approaches are comparable.
Some of my more complex queries are taking maybe 10,000 seconds and my initial intention was to break them up in the same way to see what happens.
But I'm a newbie so any advice is welcome!
If it helps, this server is dedicated to one user, running one query at a time. It is purely for processing data. It's a dedicated machine and only runs MySQL.
Here is what the table looks like. It is being loaded with around 10 million rows per month.
CREATE TABLE `table_1` (
`first_of_month` date NOT NULL,
`code1` varchar(5) NOT NULL,
`code2` varchar(15) NOT NULL,
`val1` int(11) DEFAULT NULL,
`val2` float DEFAULT NULL,
`val3` float DEFAULT NULL,
`val4` float DEFAULT NULL,
`val5` float DEFAULT NULL,
`val6` int(11) DEFAULT NULL,
`date1` datetime NOT NULL,
`code3` char(2) NOT NULL,
KEY `Firc1c2table_1` (`first_of_month`,`code1`,`code2`),
KEY `Firtable_1` (`first_of_month`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8
Many thanks.
Chrisp