hi there
I have to following table structure. The thing is that it is already big, and I’ll like to know what can be done in order to make it run faster.
CREATE TABLE IF NOT EXISTS `daily_panel` (
`id` int(11) unsigned NOT NULL auto_increment,
`created` datetime NOT NULL,
`modified` datetime NOT NULL,
`group_id` int(11) NOT NULL,
`user_id` int(11) NOT NULL,
`exam1` decimal(10,3) NOT NULL,
`exam2` decimal(10,3) NOT NULL,
`exam3` decimal(10,3) NOT NULL,
`exam4` decimal(10,3) NOT NULL,
`exam5` decimal(10,3) NOT NULL,
`exam6` decimal(10,3) NOT NULL,
`exam7` decimal(10,3) NOT NULL,
`exam8` decimal(10,3) NOT NULL,
`exam9` decimal(10,3) NOT NULL,
`exam10` decimal(10,3) NOT NULL,
`exam11` decimal(10,3) NOT NULL,
`exam12` decimal(10,3) NOT NULL,
`exam13` decimal(10,3) NOT NULL,
`exam14` decimal(10,3) NOT NULL,
`exam15` decimal(10,3) NOT NULL,
`exam16` decimal(10,3) NOT NULL,
`exam17` decimal(10,3) NOT NULL,
`exam18` decimal(10,3) NOT NULL,
`exam19` decimal(10,3) NOT NULL,
`exam20` decimal(10,3) NOT NULL,
`exam21` decimal(10,3) NOT NULL,
`exam22` decimal(10,3) NOT NULL,
`exam23` decimal(10,3) NOT NULL,
`exam24` decimal(10,3) NOT NULL,
`exam25` decimal(10,3) NOT NULL,
PRIMARY KEY (`id`),
KEY `modified` (`modified`),
KEY `created` (`created`),
KEY `user_id` (`user_id`),
KEY `group_id` (`group_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=137486 ;
I don’t know if it is useful, but this is the story behind this table: Each exam has a a maximum number of points. An exam can be passed of not. If the exam is passed, the user earns that exam points. There are the same number of exams in each day(maximum 25). The results of the group, is also important, because groups compete with each other. For each day, an HTML table with check boxes is generated for all the users of a group, and a teacher has to check the status of exams for each user.