Re: Bad performance?
Now table look like this:
CREATE TABLE `cologin` (
`id` int(10) unsigned NOT NULL auto_increment,
`kampagne_id` int(4) unsigned NOT NULL default '0',
`brugernavn` varchar(32) NOT NULL default '',
`tilmeldt` enum('y','n') NOT NULL default 'n',
`unixtimestamp` int(10) unsigned NOT NULL default '0',
PRIMARY KEY (`id`),
KEY `kampagne_id` (`kampagne_id`),
KEY `brugernavn` (`brugernavn`),
KEY `id` (`id`),
KEY `kampagne_id, brugernavn` (`kampagne_id`,`brugernavn`)
) ENGINE=ndbcluster DEFAULT CHARSET=latin1 AUTO_INCREMENT=392152 ;
SELECT * FROM cologin WHERE kampagne_id = '9' and brugernavn = 'test'; (query time 0,3-0,4 sec.)
SELECT * FROM cologin WHERE brugernavn = 'test'; (query time 0,00019 sec.)
This time I even did the select from an API on the same com as the db node.
Subject
Views
Written By
Posted
4067
December 06, 2004 06:33PM
2801
December 06, 2004 09:13PM
2754
December 07, 2004 07:18AM
2570
December 07, 2004 11:58AM
2778
December 07, 2004 01:19PM
3633
December 07, 2004 06:22PM
2667
December 08, 2004 01:33PM
Re: Bad performance?
3546
December 08, 2004 02:44PM
2754
December 09, 2004 10:05AM