(Find all)
a) index on "gender" b) index on "monthly_sum" c) index on "sales_date" d) index on "user_id"
[ Tables and Indexes (15%) - Indexes ]
mysql 5.0/5.1 questions for learning purposes
(Find all)
a) index on "gender" b) index on "monthly_sum" c) index on "sales_date" d) index on "user_id"
[ Tables and Indexes (15%) - Indexes ]
You must be logged in to post a comment.
Answers:
a b
The gender doesn’t have a lot of distinct values, so an index on it will not restrict the data very much. Indexing a sum is probably not a good idea either, as usually you want to report sums but not select by them. A date field is probably a good candidate for an index, as processing by date is a common task. Also indexing a user-id sounds like a good idea.