CertyRush
Đang tải...
C CertyRush
Câu hỏi free preview

Câu 48: C100DBA: MongoDB Associate Database Administrator

A coffee shop stores its sales in an orders collection. The orders collection contains several thousands of documents. A sample document from the orders collection looks like this:{item: “latte”,size: “S”,price: 4.12}The following query returns orders where the size is “M”:db.orders.find(“size”: “M”})Which two indexes…

Nội dung câu hỏi

A coffee shop stores its sales in an orders collection. The orders collection contains several thousands of documents. A sample document from the orders collection looks like this:{item: “latte”,size: “S”,price: 4.12}The following query returns orders where the size is “M”:db.orders.find(“size”: “M”})Which two indexes would improve performance for this query? (Choose two.)

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.

  1. A. db.orders.createindex({item: 1, size: -1})
  2. B. db.orders.createindex({price: 1, item: -1, size: 1})
  3. C. db.orders.createindex({size: 1}) — đáp án hiện tại
  4. D. db.orders.createindex({size: -1, item: 1}) — đáp án hiện tại

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.

Câu hỏi liền kề