Warning: Creating default object from empty value in /www/htdocs/v030397/mysql-qotd/wp-content/plugins/sitepress-multilingual-cms/sitepress.class.php on line 4991

Warning: Creating default object from empty value in /www/htdocs/v030397/mysql-qotd/wp-content/plugins/sitepress-multilingual-cms/sitepress.class.php on line 4993

Warning: Cannot modify header information - headers already sent by (output started at /www/htdocs/v030397/mysql-qotd/wp-content/plugins/sitepress-multilingual-cms/sitepress.class.php:4991) in /www/htdocs/v030397/mysql-qotd/wp-includes/feed-rss2-comments.php on line 8
Comments on: Question 17: Which index would support the following query the best? http://mysql-qotd.casperia.net/archives/188 mysql 5.0/5.1 questions for learning purposes Fri, 06 Aug 2010 16:56:36 +0000 http://wordpress.org/?v=abc hourly 1 By: urs http://mysql-qotd.casperia.net/archives/188/comment-page-1#comment-23 urs Sat, 13 Feb 2010 10:13:30 +0000 http://mysql-qotd.casperia.net/?p=188#comment-23 <b> Answer: a The amount of data can be restricted the best with option A. Note, that the order of fields is important in a composite index! (Columns with equality-conditions before those with range-checks) Try to create each index and use explain to find out how many rows are accessed to get the result. (just put "explain" in front of the query) </b>
Answer:

a

The amount of data can be restricted the best with option A.
Note, that the order of fields is important in a composite index!
(Columns with equality-conditions before those with range-checks)
Try to create each index and use explain to find out how many rows are accessed to get the result.
(just put “explain” in front of the query)

]]>