Câu 9: C100DEV: MongoDB Associate Developer
Given the following query:db.restaurants.find({“borough” : “Brooklyn” , “grades.score” : {$gt:5}})No index exists for the restaurant collection. What index definition most improves the performance?
Nội dung câu hỏi
Given the following query:db.restaurants.find({“borough” : “Brooklyn” , “grades.score” : {$gt:5}})No index exists for the restaurant collection. What index definition most improves the performance?
Các lựa chọn
Đáp án được giữ gọn theo nhãn A, B, C, D trong phần bình chọn tương tác.
- A. db.restaurants.createIndex({“borough” : 1, “grades.score” : 1} ) — đáp án hiện tại
- B. db.restaurants.createIndex({“grades.score” : 1, “borough” : 1} )
- C. db.restaurants.createIndex({“borough” : 1} )
- D. db.restaurants.createIndex({“grades.score” : 1} )
Cộng đồng
0 bình luận công khai. Tên thành viên được ẩn một phần.
Chưa có bình luận. Mở giao diện tương tác để bắt đầu thảo luận.