Advertisement
Guest User

Untitled

a guest
Nov 23rd, 2014
128
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.24 KB | None | 0 0
  1. # Time: 141123 19:48:38
  2. # User@Host: user[db] @ localhost []
  3. # Thread_id: 4179814 Schema: db QC_hit: No
  4. # Query_time: 0.140931 Lock_time: 0.000095 Rows_sent: 0 Rows_examined: 113
  5. SET timestamp=1416764918;
  6. SELECT `star`.`question_id`
  7. FROM `star`
  8. INNER JOIN `question` ON (`star`.`question_id` = `question`.`id`)
  9. WHERE (`star`.`user_id` = S
  10. AND `star`.`counter` >= S
  11. AND `question`.`level_id` = S);
  12.  
  13. Duration: 0.00091133
  14. Query: SELECT sql_no_cache `star`.`question_id`
  15. FROM `star`
  16. INNER JOIN `question` ON (`star`.`question_id` = `question`.`id`)
  17. WHERE (`star`.`user_id` = S
  18. AND `star`.`counter` >= S
  19. AND `question`.`level_id` = S)
  20.  
  21. Create Table: CREATE TABLE `star` (
  22. `id` int(11) NOT NULL AUTO_INCREMENT,
  23. `question_id` int(11) NOT NULL,
  24. `user_id` int(11) NOT NULL,
  25. `counter` tinyint(3) unsigned NOT NULL,
  26. PRIMARY KEY (`id`),
  27. UNIQUE KEY `user_question_combined` (`user_id`,`question_id`),
  28. KEY `star_25110688` (`question_id`),
  29. KEY `star_6340c63c` (`user_id`),
  30. CONSTRAINT `question_id_refs_id_3c6023b7` FOREIGN KEY (`question_id`) REFERENCES `question` (`id`),
  31. CONSTRAINT `user_id_refs_id_4b270cea` FOREIGN KEY (`user_id`) REFERENCES `user` (`id`)
  32. ) ENGINE=InnoDB AUTO_INCREMENT=7249102 DEFAULT CHARSET=utf8
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement