I have a table with millions of records in MySQL -> imported into Infobright using notes in wiki pages, no problem!
Here is the table syntax
CREATE TABLE `myTable` (
`a` varchar(255) COLLATE latin1_bin DEFAULT NULL,
`b` varchar(255) COLLATE latin1_bin DEFAULT NULL,
`c` bigint(20) NOT NULL,
`d` bigint(20) NOT NULL,
`e` int(10) NOT NULL
) ENGINE=BRIGHTHOUSE
now I need to run a select query 450 times, each time a different 'a' is being used a constraint as such:
SELECT d,e FROM `myTable` WHERE a = 'myString';
The goal is to speed up the amount of time all the queries in total is being called. But I am having problems with that. When I run the select query about 450 times, on average it takes 0.52 seconds each query!
When I run it through MySQL however, it takes about 1.7 milliseconds per query!
How can I optimize this to beat MySQL time? Would it require me to use the 'IN' clause, instead of the '=' with an additional selection of 'a' ontop of d,e? eg:
SELECT a,d,e FROM `myTable` WHERE a IN ('myString1','myString2'.... etc )