Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Time: 141123 19:48:38
- # User@Host: user[db] @ localhost []
- # Thread_id: 4179814 Schema: db QC_hit: No
- # Query_time: 0.140931 Lock_time: 0.000095 Rows_sent: 0 Rows_examined: 113
- SET timestamp=1416764918;
- SELECT `star`.`question_id`
- FROM `star`
- INNER JOIN `question` ON (`star`.`question_id` = `question`.`id`)
- WHERE (`star`.`user_id` = S
- AND `star`.`counter` >= S
- AND `question`.`level_id` = S);
- Duration: 0.00091133
- Query: SELECT sql_no_cache `star`.`question_id`
- FROM `star`
- INNER JOIN `question` ON (`star`.`question_id` = `question`.`id`)
- WHERE (`star`.`user_id` = S
- AND `star`.`counter` >= S
- AND `question`.`level_id` = S)
- Create Table: CREATE TABLE `star` (
- `id` int(11) NOT NULL AUTO_INCREMENT,
- `question_id` int(11) NOT NULL,
- `user_id` int(11) NOT NULL,
- `counter` tinyint(3) unsigned NOT NULL,
- PRIMARY KEY (`id`),
- UNIQUE KEY `user_question_combined` (`user_id`,`question_id`),
- KEY `star_25110688` (`question_id`),
- KEY `star_6340c63c` (`user_id`),
- CONSTRAINT `question_id_refs_id_3c6023b7` FOREIGN KEY (`question_id`) REFERENCES `question` (`id`),
- CONSTRAINT `user_id_refs_id_4b270cea` FOREIGN KEY (`user_id`) REFERENCES `user` (`id`)
- ) ENGINE=InnoDB AUTO_INCREMENT=7249102 DEFAULT CHARSET=utf8
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement