Kế hoạch thực hiện mongodb

Để trả lại thông tin về các kế hoạch truy vấn và bảng kê thực thi của các kế hoạch truy vấn, MongoDB cung cấp

  • Phương pháp

    '$lookup': {   from: ,   as: ,   localField: ,   foreignField: },totalDocsExamined: ,totalKeysExamined: ,collectionScans: ,indexesUsed: [ , , ...,  ],nReturned: ,executionTimeMillisEstimate: 
    1,
  • phương pháp

    '$lookup': {   from: ,   as: ,   localField: ,   foreignField: },totalDocsExamined: ,totalKeysExamined: ,collectionScans: ,indexesUsed: [ , , ...,  ],nReturned: ,executionTimeMillisEstimate: 
    2 và
  • lệnh

    '$lookup': {   from: ,   as: ,   localField: ,   foreignField: },totalDocsExamined: ,totalKeysExamined: ,collectionScans: ,indexesUsed: [ , , ...,  ],nReturned: ,executionTimeMillisEstimate: 
    3

Quan trọng

  • Chỉ các trường đầu ra quan trọng nhất được hiển thị trên trang này

  • Đầu ra có thể thay đổi

  • Một số trường được sử dụng nội bộ và không được ghi lại

Kết quả

'$lookup': {   from: ,   as: ,   localField: ,   foreignField: },totalDocsExamined: ,totalKeysExamined: ,collectionScans: ,indexesUsed: [ , , ...,  ],nReturned: ,executionTimeMillisEstimate: 
3 trình bày các kế hoạch truy vấn như một cây của các giai đoạn. Cấu hình đầu ra có thể khác nhau dựa trên công cụ truy vấn mà hoạt động đang sử dụng. Hoạt động có thể từ điển sử dụng công cụ truy vấn cổ hoặc công cụ truy vấn thực thi dựa trên khe

Để xem cấu trúc đầu ra có thể khác nhau giữa hai công cụ thực thi, hãy xem các ví dụ sau

Mỗi giai đoạn vượt qua các tài liệu hoặc khóa chỉ mục kết quả của nó cho nút cha. Các nút lá truy cập vào bộ sưu tập hoặc các số duy nhất. Các nút bên trong việc sử dụng các tài liệu hoặc các mục từ khóa chỉ mục xuất phát từ các nút con. Nút gốc chỉ ra giai đoạn mà MongoDB cuối cùng có kết quả được đặt từ

Các giai đoạn là mô tả của hoạt động. Ví dụ

  • '$lookup': {   from: ,   as: ,   localField: ,   foreignField: },totalDocsExamined: ,totalKeysExamined: ,collectionScans: ,indexesUsed: [ , , ...,  ],nReturned: ,executionTimeMillisEstimate: 
    5 to scan the collection
  • '$lookup': {   from: ,   as: ,   localField: ,   foreignField: },totalDocsExamined: ,totalKeysExamined: ,collectionScans: ,indexesUsed: [ , , ...,  ],nReturned: ,executionTimeMillisEstimate: 
    6 for the key only number scan
  • '$lookup': {   from: ,   as: ,   localField: ,   foreignField: },totalDocsExamined: ,totalKeysExamined: ,collectionScans: ,indexesUsed: [ , , ...,  ],nReturned: ,executionTimeMillisEstimate: 
    7 to get document
  • '$lookup': {   from: ,   as: ,   localField: ,   foreignField: },totalDocsExamined: ,totalKeysExamined: ,collectionScans: ,indexesUsed: [ , , ...,  ],nReturned: ,executionTimeMillisEstimate: 
    8 to the documented group
  • '$lookup': {   from: ,   as: ,   localField: ,   foreignField: },totalDocsExamined: ,totalKeysExamined: ,collectionScans: ,indexesUsed: [ , , ...,  ],nReturned: ,executionTimeMillisEstimate: 
    9 để hợp nhất kết quả tốt nhất từ ​​​​mảnh vỡ
  • '$lookup': {   from: ,   as: ,   localField: ,   foreignField: },totalDocsExamined: ,totalKeysExamined: ,collectionScans: ,indexesUsed: [ , , ...,  ],nReturned: ,executionTimeMillisEstimate: 
    00 để lọc các tài liệu mồ côi từ các mảnh vỡ

This section for the start up

'$lookup': {   from: ,   as: ,   localField: ,   foreignField: },totalDocsExamined: ,totalKeysExamined: ,collectionScans: ,indexesUsed: [ , , ...,  ],nReturned: ,executionTimeMillisEstimate: 
3 cho MongoDB 5. 1 trở lên. Để xem đầu giải thích cho các phiên bản cũ của MongoDB, hãy tham khảo tài liệu về phiên bản đó. Trường
'$lookup': {   from: ,   as: ,   localField: ,   foreignField: },totalDocsExamined: ,totalKeysExamined: ,collectionScans: ,indexesUsed: [ , , ...,  ],nReturned: ,executionTimeMillisEstimate: 
022Số nguyên với phiên bản kế hoạch giải thích

Trường số nguyên với phiên bản kế hoạch giải thích

'$lookup': {   from: ,   as: ,   localField: ,   foreignField: },totalDocsExamined: ,totalKeysExamined: ,collectionScans: ,indexesUsed: [ , , ...,  ],nReturned: ,executionTimeMillisEstimate: 
03 is
  • 1 Khi thực thi truy vấn dựa trên khe không sử dụng được

  • 2 Khi thực hiện truy vấn dựa trên khe được sử dụng

New in version 5. 1

'$lookup': {   from: ,   as: ,   localField: ,   foreignField: },totalDocsExamined: ,totalKeysExamined: ,collectionScans: ,indexesUsed: [ , , ...,  ],nReturned: ,executionTimeMillisEstimate: 
04 Thông tin chi tiết Kế hoạch được lựa chọn bởi Trình tối ưu hóa truy vấn. thông tin chi tiết kế hoạch được chọn bởi trình tối ưu hóa truy vấn

Những ví dụ này có thể kết hợp các cấu trúc đầu ra của các công cụ thực hiện dựa trên khe và cổ điển của MongoDB. Họ không có nghĩa là đại diện. Lượng sản phẩm của bạn có thể khác nhau đáng kể

'$lookup': {   from: ,   as: ,   localField: ,   foreignField: },totalDocsExamined: ,totalKeysExamined: ,collectionScans: ,indexesUsed: [ , , ...,  ],nReturned: ,executionTimeMillisEstimate: 
04Chứa Thông tin về việc lựa chọn gói truy vấn của Trình tối ưu hóa truy vấn

Chứa thông tin về việc lựa chọn kế hoạch truy vấn bằng trình tối ưu hóa truy vấn

String
'$lookup': {   from: ,   as: ,   localField: ,   foreignField: },totalDocsExamined: ,totalKeysExamined: ,collectionScans: ,indexesUsed: [ , , ...,  ],nReturned: ,executionTimeMillisEstimate: 
06A chỉ định danh không gian với tên của cơ sở dữ liệu và bộ sưu tập được truy cập bởi truy vấn. No time name has định dạng
'$lookup': {   from: ,   as: ,   localField: ,   foreignField: },totalDocsExamined: ,totalKeysExamined: ,collectionScans: ,indexesUsed: [ , , ...,  ],nReturned: ,executionTimeMillisEstimate: 
07

Một chuỗi chỉ định không gian tên với tên của cơ sở dữ liệu và bộ sưu tập được truy vấn truy cập. Không gian tên có định dạng

'$lookup': {   from: ,   as: ,   localField: ,   foreignField: },totalDocsExamined: ,totalKeysExamined: ,collectionScans: ,indexesUsed: [ , , ...,  ],nReturned: ,executionTimeMillisEstimate: 
07.
'$lookup': {   from: ,   as: ,   localField: ,   foreignField: },totalDocsExamined: ,totalKeysExamined: ,collectionScans: ,indexesUsed: [ , , ...,  ],nReturned: ,executionTimeMillisEstimate: 
08

Một định dạng boolean MongoDB duy nhất có áp dụng bộ lọc chỉ mục cho truy vấn định dạng cấu hình hay không

'$lookup': {   from: ,   as: ,   localField: ,   foreignField: },totalDocsExamined: ,totalKeysExamined: ,collectionScans: ,indexesUsed: [ , , ...,  ],nReturned: ,executionTimeMillisEstimate: 
09A chuỗi thập lục phân đại diện cho mũ của dạng truy vấn dạng và chỉ phụ thuộc vào các dạng truy vấn dạng.
'$lookup': {   from: ,   as: ,   localField: ,   foreignField: },totalDocsExamined: ,totalKeysExamined: ,collectionScans: ,indexesUsed: [ , , ...,  ],nReturned: ,executionTimeMillisEstimate: 
10 có thể giúp xác định truy vấn chậm (bao gồm cả bộ lọc truy vấn của các hoạt động ghi) với cùng một dạng truy vấn

Chuỗi thập lục phân đại diện cho hàm băm của hình dạng truy vấn và chỉ phụ thuộc vào hình dạng truy vấn

'$lookup': {   from: ,   as: ,   localField: ,   foreignField: },totalDocsExamined: ,totalKeysExamined: ,collectionScans: ,indexesUsed: [ , , ...,  ],nReturned: ,executionTimeMillisEstimate: 
10 có thể giúp xác định các truy vấn chậm (bao gồm cả bộ lọc truy vấn của thao tác ghi) với cùng một dạng truy vấn

Ghi chú

Như với bất kỳ hàm băm nào, hai dạng truy vấn khác nhau có thể dẫn đến cùng một giá trị băm. Tuy nhiên, sự xuất hiện của các va chạm giữa các dạng truy vấn khác nhau là không thể

To know more information about

'$lookup': {   from: ,   as: ,   localField: ,   foreignField: },totalDocsExamined: ,totalKeysExamined: ,collectionScans: ,indexesUsed: [ , , ...,  ],nReturned: ,executionTimeMillisEstimate: 
10 và
'$lookup': {   from: ,   as: ,   localField: ,   foreignField: },totalDocsExamined: ,totalKeysExamined: ,collectionScans: ,indexesUsed: [ , , ...,  ],nReturned: ,executionTimeMillisEstimate: 
12, xem
'$lookup': {   from: ,   as: ,   localField: ,   foreignField: },totalDocsExamined: ,totalKeysExamined: ,collectionScans: ,indexesUsed: [ , , ...,  ],nReturned: ,executionTimeMillisEstimate: 
10 và
'$lookup': {   from: ,   as: ,   localField: ,   foreignField: },totalDocsExamined: ,totalKeysExamined: ,collectionScans: ,indexesUsed: [ , , ...,  ],nReturned: ,executionTimeMillisEstimate: 
12
'$lookup': {   from: ,   as: ,   localField: ,   foreignField: },totalDocsExamined: ,totalKeysExamined: ,collectionScans: ,indexesUsed: [ , , ...,  ],nReturned: ,executionTimeMillisEstimate: 
15a của khóa cho mục nhập bộ đệm kế hoạch liên quan đến truy vấn

Hàm băm của khóa cho mục nhập bộ đệm kế hoạch được liên kết với truy vấn

No same as

'$lookup': {   from: ,   as: ,   localField: ,   foreignField: },totalDocsExamined: ,totalKeysExamined: ,collectionScans: ,indexesUsed: [ , , ...,  ],nReturned: ,executionTimeMillisEstimate: 
09,
'$lookup': {   from: ,   as: ,   localField: ,   foreignField: },totalDocsExamined: ,totalKeysExamined: ,collectionScans: ,indexesUsed: [ , , ...,  ],nReturned: ,executionTimeMillisEstimate: 
15 là một hàm của cả dạng truy vấn và các mục hiện có cho dạng đó. Đó là, nếu các mục có thể hỗ trợ định dạng truy vấn được thêm/giảm, value
'$lookup': {   from: ,   as: ,   localField: ,   foreignField: },totalDocsExamined: ,totalKeysExamined: ,collectionScans: ,indexesUsed: [ , , ...,  ],nReturned: ,executionTimeMillisEstimate: 
12 có thể thay đổi trong khi value
'$lookup': {   from: ,   as: ,   localField: ,   foreignField: },totalDocsExamined: ,totalKeysExamined: ,collectionScans: ,indexesUsed: [ , , ...,  ],nReturned: ,executionTimeMillisEstimate: 
10 sẽ không thay đổi. ______009 ,
'$lookup': {   from: ,   as: ,   localField: ,   foreignField: },totalDocsExamined: ,totalKeysExamined: ,collectionScans: ,indexesUsed: [ , , ...,  ],nReturned: ,executionTimeMillisEstimate: 
15
là một chức năng của cả hình dạng truy vấn và . Nghĩa là, nếu các chỉ mục có thể hỗ trợ hình dạng truy vấn được thêm/xóa, thì giá trị
'$lookup': {   from: ,   as: ,   localField: ,   foreignField: },totalDocsExamined: ,totalKeysExamined: ,collectionScans: ,indexesUsed: [ , , ...,  ],nReturned: ,executionTimeMillisEstimate: 
12 có thể thay đổi trong khi giá trị_______010 sẽ không thay đổi.

To know more information about

'$lookup': {   from: ,   as: ,   localField: ,   foreignField: },totalDocsExamined: ,totalKeysExamined: ,collectionScans: ,indexesUsed: [ , , ...,  ],nReturned: ,executionTimeMillisEstimate: 
10 và
'$lookup': {   from: ,   as: ,   localField: ,   foreignField: },totalDocsExamined: ,totalKeysExamined: ,collectionScans: ,indexesUsed: [ , , ...,  ],nReturned: ,executionTimeMillisEstimate: 
12, xem
'$lookup': {   from: ,   as: ,   localField: ,   foreignField: },totalDocsExamined: ,totalKeysExamined: ,collectionScans: ,indexesUsed: [ , , ...,  ],nReturned: ,executionTimeMillisEstimate: 
10 và
'$lookup': {   from: ,   as: ,   localField: ,   foreignField: },totalDocsExamined: ,totalKeysExamined: ,collectionScans: ,indexesUsed: [ , , ...,  ],nReturned: ,executionTimeMillisEstimate: 
12
'$lookup': {   from: ,   as: ,   localField: ,   foreignField: },totalDocsExamined: ,totalKeysExamined: ,collectionScans: ,indexesUsed: [ , , ...,  ],nReturned: ,executionTimeMillisEstimate: 
15a của khóa cho mục nhập bộ đệm kế hoạch liên quan đến truy vấn

Một giá trị boolean chỉ ra rằng toàn bộ hoạt động đường ống tổng hợp đã được tối ưu hóa và thay vào đó, được hoàn thành bởi một cây các giai đoạn thực hiện kế hoạch truy vấn

No same as

'$lookup': {   from: ,   as: ,   localField: ,   foreignField: },totalDocsExamined: ,totalKeysExamined: ,collectionScans: ,indexesUsed: [ , , ...,  ],nReturned: ,executionTimeMillisEstimate: 
09,
'$lookup': {   from: ,   as: ,   localField: ,   foreignField: },totalDocsExamined: ,totalKeysExamined: ,collectionScans: ,indexesUsed: [ , , ...,  ],nReturned: ,executionTimeMillisEstimate: 
15 là một chức năng của cả hình dạng truy vấn và các mục hiện có cho hình dạng đó. Đó là, nếu các mục có thể hỗ trợ định dạng truy vấn được thêm/giảm, value
'$lookup': {   from: ,   as: ,   localField: ,   foreignField: },totalDocsExamined: ,totalKeysExamined: ,collectionScans: ,indexesUsed: [ , , ...,  ],nReturned: ,executionTimeMillisEstimate: 
12 có thể thay đổi trong khi value
'$lookup': {   from: ,   as: ,   localField: ,   foreignField: },totalDocsExamined: ,totalKeysExamined: ,collectionScans: ,indexesUsed: [ , , ...,  ],nReturned: ,executionTimeMillisEstimate: 
10 sẽ không thay đổi.
'$lookup': {   from: ,   as: ,   localField: ,   foreignField: },totalDocsExamined: ,totalKeysExamined: ,collectionScans: ,indexesUsed: [ , , ...,  ],nReturned: ,executionTimeMillisEstimate: 
5

'$lookup': {   from: ,   as: ,   localField: ,   foreignField: },totalDocsExamined: ,totalKeysExamined: ,collectionScans: ,indexesUsed: [ , , ...,  ],nReturned: ,executionTimeMillisEstimate: 
164A Boolean chỉ ra rằng toàn bộ hoạt động đường ống tổng hợp đã được tối ưu hóa, và thay vào đó, được thực hiện bởi một cây thực hiện kế hoạch truy vấn

Ví dụ, started in MongoDB 4. 2, hoạt động tổng hợp sau đây có thể được thực hiện bằng cách thực hiện Kế hoạch Truy vấn thay vì sử dụng đường ống tổng hợp

Một tài liệu trình bày chi tiết kế hoạch được chọn bởi trình tối ưu hóa truy vấn

Trường chỉ có mặt nếu giá trị là
'$lookup': {   from: ,   as: ,   localField: ,   foreignField: },totalDocsExamined: ,totalKeysExamined: ,collectionScans: ,indexesUsed: [ , , ...,  ],nReturned: ,executionTimeMillisEstimate: 
165 và chỉ áp dụng để giải thích về các hoạt động đường ống tổng hợp. Khi
'$lookup': {   from: ,   as: ,   localField: ,   foreignField: },totalDocsExamined: ,totalKeysExamined: ,collectionScans: ,indexesUsed: [ , , ...,  ],nReturned: ,executionTimeMillisEstimate: 
165, do đường ống được tối ưu hóa, không có thông tin giai đoạn tổng hợp nào xuất hiện trong đầu ra

Một chuỗi biểu thị tên của giai đoạn

'$lookup': {   from: ,   as: ,   localField: ,   foreignField: },totalDocsExamined: ,totalKeysExamined: ,collectionScans: ,indexesUsed: [ , , ...,  ],nReturned: ,executionTimeMillisEstimate: 
167A Tài liệu chi tiết kế hoạch được lựa chọn bởi Trình tối ưu hóa truy vấn

Chuỗi

'$lookup': {   from: ,   as: ,   localField: ,   foreignField: },totalDocsExamined: ,totalKeysExamined: ,collectionScans: ,indexesUsed: [ , , ...,  ],nReturned: ,executionTimeMillisEstimate: 
168A biểu thị tên của giai đoạn

Mỗi giai đoạn bao gồm thông tin cụ thể cho giai đoạn. Ví dụ. giai đoạn
'$lookup': {   from: ,   as: ,   localField: ,   foreignField: },totalDocsExamined: ,totalKeysExamined: ,collectionScans: ,indexesUsed: [ , , ...,  ],nReturned: ,executionTimeMillisEstimate: 
6 bao gồm các giới hạn chỉ mục giống nhau với các công cụ dữ liệu có thể khác cho việc quét chỉ mục. Nếu một giai đoạn có giai đoạn trẻ em hoặc nhiều giai đoạn trẻ em, thì sân khấu sẽ có
'$lookup': {   from: ,   as: ,   localField: ,   foreignField: },totalDocsExamined: ,totalKeysExamined: ,collectionScans: ,indexesUsed: [ , , ...,  ],nReturned: ,executionTimeMillisEstimate: 
170 hoặc
'$lookup': {   from: ,   as: ,   localField: ,   foreignField: },totalDocsExamined: ,totalKeysExamined: ,collectionScans: ,indexesUsed: [ , , ...,  ],nReturned: ,executionTimeMillisEstimate: 
171

Một tài liệu mô tả giai đoạn con, cung cấp các tài liệu hoặc khóa chỉ mục cho cha mẹ của nó. Trường có mặt nếu giai đoạn cha chỉ có một con

'$lookup': {   from: ,   as: ,   localField: ,   foreignField: },totalDocsExamined: ,totalKeysExamined: ,collectionScans: ,indexesUsed: [ , , ...,  ],nReturned: ,executionTimeMillisEstimate: 
173an array tài liệu mô tả các giai đoạn trẻ em. Các giai đoạn con cung cấp tài liệu hoặc từ khóa chỉ mục cho giai đoạn cha mẹ. Trường có mặt nếu giai đoạn cha mẹ có nhiều nút con. Ví dụ. các giai đoạn cho $ hoặc biểu thức hoặc giao điểm chỉ mục tiêu thụ đầu vào từ nhiều nguồn

Một mảng tài liệu mô tả các giai đoạn con. Các giai đoạn con cung cấp các tài liệu hoặc khóa chỉ mục cho giai đoạn cha. Trường có mặt nếu giai đoạn gốc có nhiều nút con. Ví dụ: các giai đoạn cho $hoặc biểu thức hoặc giao chỉ mục sử dụng đầu vào từ .

Trường này xuất hiện nếu hoạt động sử dụng công cụ thực thi truy vấn cổ điển

'$lookup': {   from: ,   as: ,   localField: ,   foreignField: },totalDocsExamined: ,totalKeysExamined: ,collectionScans: ,indexesUsed: [ , , ...,  ],nReturned: ,executionTimeMillisEstimate: 
174A Tài liệu chi tiết về kế hoạch được lựa chọn bởi Trình tối ưu hóa truy vấn. MongoDB trình bày kế hoạch như một cây của các giai đoạn

Một tài liệu trình bày chi tiết kế hoạch được chọn bởi trình tối ưu hóa truy vấn. MongoDB trình bày kế hoạch dưới dạng cây các giai đoạn

Tài liệu này xuất hiện nếu truy vấn sử dụng công cụ truy vấn thực thi dựa trên khe

New in version 5. 1

Chuỗi
'$lookup': {   from: ,   as: ,   localField: ,   foreignField: },totalDocsExamined: ,totalKeysExamined: ,collectionScans: ,indexesUsed: [ , , ...,  ],nReturned: ,executionTimeMillisEstimate: 
175A biểu thị tên của giai đoạn

Một chuỗi biểu thị tên của giai đoạn

Mỗi giai đoạn bao gồm thông tin cụ thể cho giai đoạn. Ví dụ. giai đoạn

'$lookup': {   from: ,   as: ,   localField: ,   foreignField: },totalDocsExamined: ,totalKeysExamined: ,collectionScans: ,indexesUsed: [ , , ...,  ],nReturned: ,executionTimeMillisEstimate: 
6 bao gồm các giới hạn chỉ mục giống nhau với các công cụ dữ liệu có thể khác cho việc quét chỉ mục.
'$lookup': {   from: ,   as: ,   localField: ,   foreignField: },totalDocsExamined: ,totalKeysExamined: ,collectionScans: ,indexesUsed: [ , , ...,  ],nReturned: ,executionTimeMillisEstimate: 
177Unique Trường số nguyên xác định từng giai đoạn trong kế hoạch thực hiện. Trường được bao gồm trong tất cả các giai đoạn trong suốt kết quả
'$lookup': {   from: ,   as: ,   localField: ,   foreignField: },totalDocsExamined: ,totalKeysExamined: ,collectionScans: ,indexesUsed: [ , , ...,  ],nReturned: ,executionTimeMillisEstimate: 
3

Trường số nguyên duy nhất xác định từng giai đoạn trong kế hoạch thực hiện. Trường được bao gồm trong tất cả các giai đoạn trong suốt

'$lookup': {   from: ,   as: ,   localField: ,   foreignField: },totalDocsExamined: ,totalKeysExamined: ,collectionScans: ,indexesUsed: [ , , ...,  ],nReturned: ,executionTimeMillisEstimate: 
3 kết quả

New in version 5. 1

Chuỗi
'$lookup': {   from: ,   as: ,   localField: ,   foreignField: },totalDocsExamined: ,totalKeysExamined: ,collectionScans: ,indexesUsed: [ , , ...,  ],nReturned: ,executionTimeMillisEstimate: 
175A biểu thị tên của giai đoạn

Xem

'$lookup': {   from: ,   as: ,   localField: ,   foreignField: },totalDocsExamined: ,totalKeysExamined: ,collectionScans: ,indexesUsed: [ , , ...,  ],nReturned: ,executionTimeMillisEstimate: 
172

Mỗi giai đoạn bao gồm thông tin cụ thể cho giai đoạn. Ví dụ. giai đoạn
'$lookup': {   from: ,   as: ,   localField: ,   foreignField: },totalDocsExamined: ,totalKeysExamined: ,collectionScans: ,indexesUsed: [ , , ...,  ],nReturned: ,executionTimeMillisEstimate: 
6 bao gồm các giới hạn chỉ mục giống nhau với các công cụ dữ liệu có thể khác cho việc quét chỉ mục

Tài liệu có thông tin về cây kế hoạch thực hiện truy vấn dựa trên vị trí và các giai đoạn

New in version 5. 1

Chuỗi
'$lookup': {   from: ,   as: ,   localField: ,   foreignField: },totalDocsExamined: ,totalKeysExamined: ,collectionScans: ,indexesUsed: [ , , ...,  ],nReturned: ,executionTimeMillisEstimate: 
175A biểu thị tên của giai đoạn

Mảng kế hoạch ứng cử viên được trình tối ưu hóa truy vấn xem xét và từ chối. Mảng có thể trống nếu không có kế hoạch ứng cử viên nào khác

Mỗi giai đoạn bao gồm thông tin cụ thể cho giai đoạn. Ví dụ. giai đoạn

'$lookup': {   from: ,   as: ,   localField: ,   foreignField: },totalDocsExamined: ,totalKeysExamined: ,collectionScans: ,indexesUsed: [ , , ...,  ],nReturned: ,executionTimeMillisEstimate: 
6 bao gồm các giới hạn chỉ mục giống nhau với các công cụ dữ liệu có thể khác cho việc quét chỉ mục. ______0183 thông tin chi tiết về việc thực hiện kế hoạch chiến thắng. Để bao gồm
'$lookup': {   from: ,   as: ,   localField: ,   foreignField: },totalDocsExamined: ,totalKeysExamined: ,collectionScans: ,indexesUsed: [ , , ...,  ],nReturned: ,executionTimeMillisEstimate: 
17 trong kết quả, bạn phải chạy giải thích trong một trong hai.
  • '$lookup': {   from: ,   as: ,   localField: ,   foreignField: },totalDocsExamined: ,totalKeysExamined: ,collectionScans: ,indexesUsed: [ , , ...,  ],nReturned: ,executionTimeMillisEstimate: 
    177Unique Trường số nguyên xác định từng giai đoạn trong kế hoạch thực hiện. Trường được bao gồm trong tất cả các giai đoạn trong suốt kết quả

    '$lookup': {   from: ,   as: ,   localField: ,   foreignField: },totalDocsExamined: ,totalKeysExamined: ,collectionScans: ,indexesUsed: [ , , ...,  ],nReturned: ,executionTimeMillisEstimate: 
    3
  • '$lookup': {   from: ,   as: ,   localField: ,   foreignField: },totalDocsExamined: ,totalKeysExamined: ,collectionScans: ,indexesUsed: [ , , ...,  ],nReturned: ,executionTimeMillisEstimate: 
    179Xem
    '$lookup': {   from: ,   as: ,   localField: ,   foreignField: },totalDocsExamined: ,totalKeysExamined: ,collectionScans: ,indexesUsed: [ , , ...,  ],nReturned: ,executionTimeMillisEstimate: 
    172

'$lookup': {   from: ,   as: ,   localField: ,   foreignField: },totalDocsExamined: ,totalKeysExamined: ,collectionScans: ,indexesUsed: [ , , ...,  ],nReturned: ,executionTimeMillisEstimate: 
181Tài liệu với thông tin về cây thực hiện truy vấn dựa trên khe và các giai đoạn

'$lookup': {   from: ,   as: ,   localField: ,   foreignField: },totalDocsExamined: ,totalKeysExamined: ,collectionScans: ,indexesUsed: [ , , ...,  ],nReturned: ,executionTimeMillisEstimate: 
182Mảng của các thành viên ứng dụng kế hoạch được xem xét và từ chối bởi tối ưu hóa truy vấn. Mảng có thể trống nếu không có kế hoạch ứng cử viên nào khác

Chứa số liệu thống kê mô tả việc thực hiện truy vấn đã hoàn thành cho kế hoạch chiến thắng. Đối với các thao tác ghi, việc thực hiện truy vấn đã hoàn thành đề cập đến các sửa đổi sẽ được thực hiện nhưng không áp dụng các sửa đổi đó cho cơ sở dữ liệu

Thông tin đã trả lại
'$lookup': {   from: ,   as: ,   localField: ,   foreignField: },totalDocsExamined: ,totalKeysExamined: ,collectionScans: ,indexesUsed: [ , , ...,  ],nReturned: ,executionTimeMillisEstimate: 
183 chi tiết về việc thực hiện kế hoạch chiến thắng. Để đưa
'$lookup': {   from: ,   as: ,   localField: ,   foreignField: },totalDocsExamined: ,totalKeysExamined: ,collectionScans: ,indexesUsed: [ , , ...,  ],nReturned: ,executionTimeMillisEstimate: 
17 vào kết quả, bạn phải chạy giải thích trong một trong hai

Số tài liệu phù hợp với điều kiện truy vấn. ______0188 tương ứng với trường

'$lookup': {   from: ,   as: ,   localField: ,   foreignField: },totalDocsExamined: ,totalKeysExamined: ,collectionScans: ,indexesUsed: [ , , ...,  ],nReturned: ,executionTimeMillisEstimate: 
189 được trả về bởi

'$lookup': {   from: ,   as: ,   localField: ,   foreignField: },totalDocsExamined: ,totalKeysExamined: ,collectionScans: ,indexesUsed: [ , , ...,  ],nReturned: ,executionTimeMillisEstimate: 
2 trong các phiên bản trước của MongoDB. execStats hoặc

Tổng thời gian tính bằng mili giây cần thiết để lựa chọn gói truy vấn và thực hiện truy vấn. ______0191 tương ứng với trường

'$lookup': {   from: ,   as: ,   localField: ,   foreignField: },totalDocsExamined: ,totalKeysExamined: ,collectionScans: ,indexesUsed: [ , , ...,  ],nReturned: ,executionTimeMillisEstimate: 
193 được trả về bởi

'$lookup': {   from: ,   as: ,   localField: ,   foreignField: },totalDocsExamined: ,totalKeysExamined: ,collectionScans: ,indexesUsed: [ , , ...,  ],nReturned: ,executionTimeMillisEstimate: 
2 trong các phiên bản trước của MongoDB. độ chi tiết chế độ allplanexecution. Sử dụng chế độ
'$lookup': {   from: ,   as: ,   localField: ,   foreignField: },totalDocsExamined: ,totalKeysExamined: ,collectionScans: ,indexesUsed: [ , , ...,  ],nReturned: ,executionTimeMillisEstimate: 
185 để bao gồm dữ liệu thực thi một phần được ghi lại trong quá trình lựa chọn kế hoạch.

Số mục nhập chỉ mục được quét. ______0195 tương ứng với trường

'$lookup': {   from: ,   as: ,   localField: ,   foreignField: },totalDocsExamined: ,totalKeysExamined: ,collectionScans: ,indexesUsed: [ , , ...,  ],nReturned: ,executionTimeMillisEstimate: 
197 được trả về bởi

'$lookup': {   from: ,   as: ,   localField: ,   foreignField: },totalDocsExamined: ,totalKeysExamined: ,collectionScans: ,indexesUsed: [ , , ...,  ],nReturned: ,executionTimeMillisEstimate: 
2 trong các phiên bản trước của MongoDB. Những ví dụ này có thể kết hợp các cấu trúc đầu ra của các công cụ thực hiện dựa trên khe và cổ điển của MongoDB. Họ không có nghĩa là đại diện. Lượng sản phẩm của bạn có thể khác nhau đáng kể

Số lượng tài liệu được kiểm tra trong quá trình thực hiện truy vấn. Các giai đoạn thực hiện truy vấn phổ biến để kiểm tra tài liệu là

'$lookup': {   from: ,   as: ,   localField: ,   foreignField: },totalDocsExamined: ,totalKeysExamined: ,collectionScans: ,indexesUsed: [ , , ...,  ],nReturned: ,executionTimeMillisEstimate: 
5 và
'$lookup': {   from: ,   as: ,   localField: ,   foreignField: },totalDocsExamined: ,totalKeysExamined: ,collectionScans: ,indexesUsed: [ , , ...,  ],nReturned: ,executionTimeMillisEstimate: 
7

Thống kê serverInfo Chứa mô tả công việc thực hiện truy vấn đã hoàn thành cho kế hoạch chiến thắng. Đối với các hoạt động ghi, việc thực hiện truy vấn đã hoàn thành đề cập đến các sửa đổi sẽ được thực hiện, nhưng không áp dụng các sửa đổi cho cơ sở dữ liệu

'$lookup': {   from: ,   as: ,   localField: ,   foreignField: },totalDocsExamined: ,totalKeysExamined: ,collectionScans: ,indexesUsed: [ , , ...,  ],nReturned: ,executionTimeMillisEstimate: 
187Số tài liệu phù hợp với điều kiện truy vấn.
'$lookup': {   from: ,   as: ,   localField: ,   foreignField: },totalDocsExamined: ,totalKeysExamined: ,collectionScans: ,indexesUsed: [ , , ...,  ],nReturned: ,executionTimeMillisEstimate: 
188 tương thích với trường
'$lookup': {   from: ,   as: ,   localField: ,   foreignField: },totalDocsExamined: ,totalKeysExamined: ,collectionScans: ,indexesUsed: [ , , ...,  ],nReturned: ,executionTimeMillisEstimate: 
189 được trả về bởi
'$lookup': {   from: ,   as: ,   localField: ,   foreignField: },totalDocsExamined: ,totalKeysExamined: ,collectionScans: ,indexesUsed: [ , , ...,  ],nReturned: ,executionTimeMillisEstimate: 
2 trong các phiên bản trước của MongoDB

Chi tiết việc thực hiện hoàn thành kế hoạch chiến thắng dưới dạng cây các giai đoạn; . e. một giai đoạn có thể có một ________ 0170 hoặc nhiều _______ 0171

'$lookup': {   from: ,   as: ,   localField: ,   foreignField: },totalDocsExamined: ,totalKeysExamined: ,collectionScans: ,indexesUsed: [ , , ...,  ],nReturned: ,executionTimeMillisEstimate: 
191 Thời gian tính bằng mili giây cần thiết để đưa ra quyết định lựa chọn kế hoạch truy vấn và thực hiện truy vấn.
'$lookup': {   from: ,   as: ,   localField: ,   foreignField: },totalDocsExamined: ,totalKeysExamined: ,collectionScans: ,indexesUsed: [ , , ...,  ],nReturned: ,executionTimeMillisEstimate: 
191 tương ứng với trường
'$lookup': {   from: ,   as: ,   localField: ,   foreignField: },totalDocsExamined: ,totalKeysExamined: ,collectionScans: ,indexesUsed: [ , , ...,  ],nReturned: ,executionTimeMillisEstimate: 
193 được trả về bởi

'$lookup': {   from: ,   as: ,   localField: ,   foreignField: },totalDocsExamined: ,totalKeysExamined: ,collectionScans: ,indexesUsed: [ , , ...,  ],nReturned: ,executionTimeMillisEstimate: 
2 trong các phiên bản trước của MongoDB
  • '$lookup': {   from: ,   as: ,   localField: ,   foreignField: },totalDocsExamined: ,totalKeysExamined: ,collectionScans: ,indexesUsed: [ , , ...,  ],nReturned: ,executionTimeMillisEstimate: 
    205

  • '$lookup': {   from: ,   as: ,   localField: ,   foreignField: },totalDocsExamined: ,totalKeysExamined: ,collectionScans: ,indexesUsed: [ , , ...,  ],nReturned: ,executionTimeMillisEstimate: 
    206

  • '$lookup': {   from: ,   as: ,   localField: ,   foreignField: },totalDocsExamined: ,totalKeysExamined: ,collectionScans: ,indexesUsed: [ , , ...,  ],nReturned: ,executionTimeMillisEstimate: 
    207

  • '$lookup': {   from: ,   as: ,   localField: ,   foreignField: },totalDocsExamined: ,totalKeysExamined: ,collectionScans: ,indexesUsed: [ , , ...,  ],nReturned: ,executionTimeMillisEstimate: 
    208

'$lookup': {   from: ,   as: ,   localField: ,   foreignField: },totalDocsExamined: ,totalKeysExamined: ,collectionScans: ,indexesUsed: [ , , ...,  ],nReturned: ,executionTimeMillisEstimate: 
195Số lượng mục nhập chỉ mục được quét.
'$lookup': {   from: ,   as: ,   localField: ,   foreignField: },totalDocsExamined: ,totalKeysExamined: ,collectionScans: ,indexesUsed: [ , , ...,  ],nReturned: ,executionTimeMillisEstimate: 
195 tương ứng với trường
'$lookup': {   from: ,   as: ,   localField: ,   foreignField: },totalDocsExamined: ,totalKeysExamined: ,collectionScans: ,indexesUsed: [ , , ...,  ],nReturned: ,executionTimeMillisEstimate: 
197 được trả về bởi

'$lookup': {   from: ,   as: ,   localField: ,   foreignField: },totalDocsExamined: ,totalKeysExamined: ,collectionScans: ,indexesUsed: [ , , ...,  ],nReturned: ,executionTimeMillisEstimate: 
2 trong các phiên bản trước của MongoDB.
'$lookup': {   from: ,   as: ,   localField: ,   foreignField: },totalDocsExamined: ,totalKeysExamined: ,collectionScans: ,indexesUsed: [ , , ...,  ],nReturned: ,executionTimeMillisEstimate: 
199 Số tài liệu được kiểm tra trong quá trình thực hiện truy vấn. Các giai đoạn thực hiện truy vấn biến kiểm tra tài liệu phổ biến là
'$lookup': {   from: ,   as: ,   localField: ,   foreignField: },totalDocsExamined: ,totalKeysExamined: ,collectionScans: ,indexesUsed: [ , , ...,  ],nReturned: ,executionTimeMillisEstimate: 
5 và
'$lookup': {   from: ,   as: ,   localField: ,   foreignField: },totalDocsExamined: ,totalKeysExamined: ,collectionScans: ,indexesUsed: [ , , ...,  ],nReturned: ,executionTimeMillisEstimate: 
7

Lượng thời gian ước tính tính bằng mili giây để thực hiện truy vấn

Ghi chú

Bắt đầu từ MongoDB 5. 1, số lần một giai đoạn được mở trong khi thực hiện truy vấn

'$lookup': {   from: ,   as: ,   localField: ,   foreignField: },totalDocsExamined: ,totalKeysExamined: ,collectionScans: ,indexesUsed: [ , , ...,  ],nReturned: ,executionTimeMillisEstimate: 
202Chi tiết Việc thực hiện hoàn thành kế hoạch chiến thắng như một cây của các giai đoạn;

Bắt đầu từ MongoDB 5. 1, số lần một giai đoạn bị đóng trong khi thực hiện truy vấn

Bắt đầu từ MongoDB 5. 1, một giai đoạn có thể có các giai đoạn đầu vào

Chỉ định số lượng "đơn vị công việc" được thực hiện bởi giai đoạn thực hiện truy vấn. Thực thi truy vấn chia công việc của nó thành các đơn vị nhỏ. Một "đơn vị công việc" có thể bao gồm kiểm tra một khóa chỉ mục, tìm nạp một tài liệu từ bộ sưu tập, áp dụng phép chiếu cho một tài liệu hoặc thực hiện một phần sổ sách kế toán nội bộ

Trường này xuất hiện nếu hoạt động sử dụng công cụ thực thi truy vấn cổ điển

Mỗi giai đoạn bao gồm thông tin thực thi cụ thể cho giai đoạn

Số lần mà giai đoạn truy vấn tạm dừng xử lý và lưu trạng thái thực thi hiện tại của nó, chẳng hạn như để chuẩn bị tạo ra các khóa của nó

'$lookup': {   from: ,   as: ,   localField: ,   foreignField: },totalDocsExamined: ,totalKeysExamined: ,collectionScans: ,indexesUsed: [ , , ...,  ],nReturned: ,executionTimeMillisEstimate: 
209 Thời lượng ước tính bằng mili giây để thực hiện truy vấn

Số lần mà giai đoạn truy vấn khôi phục trạng thái thực thi đã lưu, chẳng hạn như sau khi khôi phục các khóa mà nó đã mang lại trước đó

'$lookup': {   from: ,   as: ,   localField: ,   foreignField: },totalDocsExamined: ,totalKeysExamined: ,collectionScans: ,indexesUsed: [ , , ...,  ],nReturned: ,executionTimeMillisEstimate: 
210Bắt đầu trong MongoDB 5. 1, số lần một giai đoạn được mở trong quá trình thực hiện truy vấn

Chỉ định xem giai đoạn thực thi đã đến cuối luồng hay chưa

  • '$lookup': {   from: ,   as: ,   localField: ,   foreignField: },totalDocsExamined: ,totalKeysExamined: ,collectionScans: ,indexesUsed: [ , , ...,  ],nReturned: ,executionTimeMillisEstimate: 
    211 khởi động trong MongoDB 5. 1, number times a phase phase has been close in too the process to query

  • '$lookup': {   from: ,   as: ,   localField: ,   foreignField: },totalDocsExamined: ,totalKeysExamined: ,collectionScans: ,indexesUsed: [ , , ...,  ],nReturned: ,executionTimeMillisEstimate: 
    212Spec only number of "đơn vị công việc" được thực hiện bởi giai đoạn thực thi truy vấn. Truy vấn thực thi việc chia công việc của nó thành các đơn vị nhỏ. Một "đơn vị làm việc" có thể bao gồm việc kiểm tra một khóa mục duy nhất, tìm tải một tài liệu duy nhất từ ​​​​bộ sưu tập, áp dụng một tài liệu tham khảo cho một tài liệu hoặc thực hiện một phần sách

'$lookup': {   from: ,   as: ,   localField: ,   foreignField: },totalDocsExamined: ,totalKeysExamined: ,collectionScans: ,indexesUsed: [ , , ...,  ],nReturned: ,executionTimeMillisEstimate: 
213 Số lần mà giai đoạn truy vấn đã đình chỉ xử lý và lưu trạng thái thực thi hiện tại của nó, ví dụ như để chuẩn bị cho công việc mang lại khóa của nó

Mỗi

'$lookup': {   from: ,   as: ,   localField: ,   foreignField: },totalDocsExamined: ,totalKeysExamined: ,collectionScans: ,indexesUsed: [ , , ...,  ],nReturned: ,executionTimeMillisEstimate: 
170 có thể có các trường khác nhau tùy thuộc vào giá trị của

'$lookup': {   from: ,   as: ,   localField: ,   foreignField: },totalDocsExamined: ,totalKeysExamined: ,collectionScans: ,indexesUsed: [ , , ...,  ],nReturned: ,executionTimeMillisEstimate: 
08. Bảng sau đây mô tả các trường khả thi và chúng có thể xuất hiện ở giai đoạn nào

Ngoài ra

'$lookup': {   from: ,   as: ,   localField: ,   foreignField: },totalDocsExamined: ,totalKeysExamined: ,collectionScans: ,indexesUsed: [ , , ...,  ],nReturned: ,executionTimeMillisEstimate: 
170 có thể có một
'$lookup': {   from: ,   as: ,   localField: ,   foreignField: },totalDocsExamined: ,totalKeysExamined: ,collectionScans: ,indexesUsed: [ , , ...,  ],nReturned: ,executionTimeMillisEstimate: 
170 khác như một trường. Xem Giải thích Cấu trúc đầu ra. Giải thích cấu trúc đầu ra.

đồng ruộng

Mô tả sự kiện

Giai đoạn áp dụng

'$lookup': {   from: ,   as: ,   localField: ,   foreignField: },totalDocsExamined: ,totalKeysExamined: ,collectionScans: ,indexesUsed: [ , , ...,  ],nReturned: ,executionTimeMillisEstimate: 
11

Chỉ định số lượng tài liệu được quét trong giai đoạn thực hiện truy vấn

'$lookup': {   from: ,   as: ,   localField: ,   foreignField: },totalDocsExamined: ,totalKeysExamined: ,collectionScans: ,indexesUsed: [ , , ...,  ],nReturned: ,executionTimeMillisEstimate: 
5,
'$lookup': {   from: ,   as: ,   localField: ,   foreignField: },totalDocsExamined: ,totalKeysExamined: ,collectionScans: ,indexesUsed: [ , , ...,  ],nReturned: ,executionTimeMillisEstimate: 
7

'$lookup': {   from: ,   as: ,   localField: ,   foreignField: },totalDocsExamined: ,totalKeysExamined: ,collectionScans: ,indexesUsed: [ , , ...,  ],nReturned: ,executionTimeMillisEstimate: 
14

Đối chiếu với các giai đoạn thực thi truy vấn quét một mục

'$lookup': {   from: ,   as: ,   localField: ,   foreignField: },totalDocsExamined: ,totalKeysExamined: ,collectionScans: ,indexesUsed: [ , , ...,  ],nReturned: ,executionTimeMillisEstimate: 
14 là tổng số từ khóa trong giới hạn và giới hạn ngoài được kiểm tra trong quá trình quét chỉ mục. Nếu quét chỉ bao gồm một số phạm vi từ khóa tiếp giáp duy nhất, chỉ cần kiểm tra các từ khóa trong giới hạn. Nếu các giới hạn chỉ mục bao gồm một số phạm vi chính, quy trình thực thi quét chỉ số có thể kiểm tra các khóa giới hạn bên ngoài để bỏ qua một phạm vi cuối cùng đến đầu tiếp theo

'$lookup': {   from: ,   as: ,   localField: ,   foreignField: },totalDocsExamined: ,totalKeysExamined: ,collectionScans: ,indexesUsed: [ , , ...,  ],nReturned: ,executionTimeMillisEstimate: 
6

'$lookup': {   from: ,   as: ,   localField: ,   foreignField: },totalDocsExamined: ,totalKeysExamined: ,collectionScans: ,indexesUsed: [ , , ...,  ],nReturned: ,executionTimeMillisEstimate: 
17

Số lượng tài liệu bị quét hoặc khóa chỉ mục được kiểm tra trong giai đoạn thực hiện truy vấn

New in version 5. 1

'$lookup': {   from: ,   as: ,   localField: ,   foreignField: },totalDocsExamined: ,totalKeysExamined: ,collectionScans: ,indexesUsed: [ , , ...,  ],nReturned: ,executionTimeMillisEstimate: 
5,
'$lookup': {   from: ,   as: ,   localField: ,   foreignField: },totalDocsExamined: ,totalKeysExamined: ,collectionScans: ,indexesUsed: [ , , ...,  ],nReturned: ,executionTimeMillisEstimate: 
6

'$lookup': {   from: ,   as: ,   localField: ,   foreignField: },totalDocsExamined: ,totalKeysExamined: ,collectionScans: ,indexesUsed: [ , , ...,  ],nReturned: ,executionTimeMillisEstimate: 
20

Số lần chúng tôi phải tìm kiếm con trỏ trỏ đến một vị trí mới để hoàn tất việc quét chỉ mục

'$lookup': {   from: ,   as: ,   localField: ,   foreignField: },totalDocsExamined: ,totalKeysExamined: ,collectionScans: ,indexesUsed: [ , , ...,  ],nReturned: ,executionTimeMillisEstimate: 
6

'$lookup': {   from: ,   as: ,   localField: ,   foreignField: },totalDocsExamined: ,totalKeysExamined: ,collectionScans: ,indexesUsed: [ , , ...,  ],nReturned: ,executionTimeMillisEstimate: 
22

Số lượng gần đúng của các byte trong bộ nhớ tràn vào đĩa trong giai đoạn

New in version 5. 3

'$lookup': {   from: ,   as: ,   localField: ,   foreignField: },totalDocsExamined: ,totalKeysExamined: ,collectionScans: ,indexesUsed: [ , , ...,  ],nReturned: ,executionTimeMillisEstimate: 
8

'$lookup': {   from: ,   as: ,   localField: ,   foreignField: },totalDocsExamined: ,totalKeysExamined: ,collectionScans: ,indexesUsed: [ , , ...,  ],nReturned: ,executionTimeMillisEstimate: 
24

Số lượng hồ sơ được sản xuất tràn vào đĩa trong giai đoạn

New in version 5. 3

'$lookup': {   from: ,   as: ,   localField: ,   foreignField: },totalDocsExamined: ,totalKeysExamined: ,collectionScans: ,indexesUsed: [ , , ...,  ],nReturned: ,executionTimeMillisEstimate: 
8

'$lookup': {   from: ,   as: ,   localField: ,   foreignField: },totalDocsExamined: ,totalKeysExamined: ,collectionScans: ,indexesUsed: [ , , ...,  ],nReturned: ,executionTimeMillisEstimate: 
26

Số lượng hồ sơ được sản xuất tràn vào đĩa trong giai đoạn

New in version 5. 3

'$lookup': {   from: ,   as: ,   localField: ,   foreignField: },totalDocsExamined: ,totalKeysExamined: ,collectionScans: ,indexesUsed: [ , , ...,  ],nReturned: ,executionTimeMillisEstimate: 
8Số lượng hồ sơ được sản xuất tràn vào đĩa trong giai đoạn

Chứa thông tin thực hiện một phần được ghi lại trong giai đoạn lựa chọn kế hoạch cho cả kế hoạch chiến thắng và bị từ chối. Trường này chỉ hiện diện nếu

'$lookup': {   from: ,   as: ,   localField: ,   foreignField: },totalDocsExamined: ,totalKeysExamined: ,collectionScans: ,indexesUsed: [ , , ...,  ],nReturned: ,executionTimeMillisEstimate: 
3 chạy ở chế độ chi tiết
'$lookup': {   from: ,   as: ,   localField: ,   foreignField: },totalDocsExamined: ,totalKeysExamined: ,collectionScans: ,indexesUsed: [ , , ...,  ],nReturned: ,executionTimeMillisEstimate: 
185

Cho dù sân khấu đã viết cho đĩa

'$lookup': {   from: ,   as: ,   localField: ,   foreignField: },totalDocsExamined: ,totalKeysExamined: ,collectionScans: ,indexesUsed: [ , , ...,  ],nReturned: ,executionTimeMillisEstimate: 
28Chứa Thông tin thực thi một phần được ghi lại trong giai đoạn quyết định lựa chọn kế hoạch cho cả hai kế hoạch chiến thắng và bị từ chối. Trường chỉ có mặt nếu
'$lookup': {   from: ,   as: ,   localField: ,   foreignField: },totalDocsExamined: ,totalKeysExamined: ,collectionScans: ,indexesUsed: [ , , ...,  ],nReturned: ,executionTimeMillisEstimate: 
3 chạy ở chế độ
'$lookup': {   from: ,   as: ,   localField: ,   foreignField: },totalDocsExamined: ,totalKeysExamined: ,collectionScans: ,indexesUsed: [ , , ...,  ],nReturned: ,executionTimeMillisEstimate: 
185. giải thích kết quả có thể bao gồm số liệu thống kê thực thi cho các truy vấn sử dụng giai đoạn quy trình
'$lookup': {   from: ,   as: ,   localField: ,   foreignField: },totalDocsExamined: ,totalKeysExamined: ,collectionScans: ,indexesUsed: [ , , ...,  ],nReturned: ,executionTimeMillisEstimate: 
19. Để bao gồm các số liệu thống kê thực thi đó, bạn phải chạy thao tác giải thích ở một trong các chế độ chi tiết thực thi này.
  • New in version 5. 0

  • Các kết quả giải thích có thể bao gồm số liệu thống kê thực thi cho các truy vấn sử dụng giai đoạn đường ống

    '$lookup': {   from: ,   as: ,   localField: ,   foreignField: },totalDocsExamined: ,totalKeysExamined: ,collectionScans: ,indexesUsed: [ , , ...,  ],nReturned: ,executionTimeMillisEstimate: 
    19. Để bao gồm các bảng kê thực thi đó, bạn phải chạy hoạt động giải thích trong một trong các chế độ xác thực thi này

execStats

'$lookup': {   from: ,   as: ,   localField: ,   foreignField: },totalDocsExamined: ,totalKeysExamined: ,collectionScans: ,indexesUsed: [ , , ...,  ],nReturned: ,executionTimeMillisEstimate: 

Thực hiện tất cả kế hoạch

Các trường sau được bao gồm trong kết quả giải thích cho truy vấn

'$lookup': {   from: ,   as: ,   localField: ,   foreignField: },totalDocsExamined: ,totalKeysExamined: ,collectionScans: ,indexesUsed: [ , , ...,  ],nReturned: ,executionTimeMillisEstimate: 
19

Để xem các mô tả cho các trường trong phần
'$lookup': {   from: ,   as: ,   localField: ,   foreignField: },totalDocsExamined: ,totalKeysExamined: ,collectionScans: ,indexesUsed: [ , , ...,  ],nReturned: ,executionTimeMillisEstimate: 
19, hãy xem trang
'$lookup': {   from: ,   as: ,   localField: ,   foreignField: },totalDocsExamined: ,totalKeysExamined: ,collectionScans: ,indexesUsed: [ , , ...,  ],nReturned: ,executionTimeMillisEstimate: 
19

Số lượng tài liệu được kiểm tra trong quá trình thực hiện truy vấn

Other field is

Số khóa chỉ mục được kiểm tra

'$lookup': {   from: ,   as: ,   localField: ,   foreignField: },totalDocsExamined: ,totalKeysExamined: ,collectionScans: ,indexesUsed: [ , , ...,  ],nReturned: ,executionTimeMillisEstimate: 
35Số tài liệu được kiểm tra trong quá trình thực hiện truy vấn

Số lần quét bộ sưu tập xảy ra trong khi thực hiện truy vấn. Trong quá trình quét bộ sưu tập, mỗi tài liệu trong bộ sưu tập được so sánh với vị từ truy vấn. Quá trình quét bộ sưu tập diễn ra nếu không tồn tại chỉ mục phù hợp bao hàm truy vấn

'$lookup': {   from: ,   as: ,   localField: ,   foreignField: },totalDocsExamined: ,totalKeysExamined: ,collectionScans: ,indexesUsed: [ , , ...,  ],nReturned: ,executionTimeMillisEstimate: 
36Số của các phím số chỉ được kiểm tra

Mảng chuỗi có tên của các chỉ mục được sử dụng bởi truy vấn

'$lookup': {   from: ,   as: ,   localField: ,   foreignField: },totalDocsExamined: ,totalKeysExamined: ,collectionScans: ,indexesUsed: [ , , ...,  ],nReturned: ,executionTimeMillisEstimate: 
37Số lần quét bộ sưu tập đã xảy ra trong quá trình thực hiện truy vấn. Trong quá trình quét thu thập, mỗi tài liệu trong một bộ sưu tập tập tin được so sánh với vị trí từ truy vấn. Số liệu quét xảy ra nếu không có số giải thích duy nhất tồn tại trong bao gồm truy vấn

Số tài liệu phù hợp với điều kiện truy vấn

'$lookup': {   from: ,   as: ,   localField: ,   foreignField: },totalDocsExamined: ,totalKeysExamined: ,collectionScans: ,indexesUsed: [ , , ...,  ],nReturned: ,executionTimeMillisEstimate: 
38Array of the string with name of the index are used by query

Thời gian ước tính tính bằng mili giây để thực hiện truy vấn

'$lookup': {   from: ,   as: ,   localField: ,   foreignField: },totalDocsExamined: ,totalKeysExamined: ,collectionScans: ,indexesUsed: [ , , ...,  ],nReturned: ,executionTimeMillisEstimate: 
39Số tài liệu phù hợp với điều kiện truy vấn

time time

'$lookup': {   from: ,   as: ,   localField: ,   foreignField: },totalDocsExamined: ,totalKeysExamined: ,collectionScans: ,indexesUsed: [ , , ...,  ],nReturned: ,executionTimeMillisEstimate: 
40 trong mili giây để thực hiện truy vấn

Nếu kế hoạch lập kế hoạch truy vấn chọn quét thu thập, kết quả giải thích bao gồm giai đoạn

'$lookup': {   from: ,   as: ,   localField: ,   foreignField: },totalDocsExamined: ,totalKeysExamined: ,collectionScans: ,indexesUsed: [ , , ...,  ],nReturned: ,executionTimeMillisEstimate: 
5

Nếu kế hoạch truy vấn kế hoạch chọn một mục duy nhất, kết quả giải thích bao gồm giai đoạn

'$lookup': {   from: ,   as: ,   localField: ,   foreignField: },totalDocsExamined: ,totalKeysExamined: ,collectionScans: ,indexesUsed: [ , , ...,  ],nReturned: ,executionTimeMillisEstimate: 
6. Giai đoạn bao gồm thông tin như chỉ mục khóa mẫu, hướng tải xuống và giới hạn chỉ mục

Bắt đầu từ MongoDB 5. 3, nếu kế hoạch lập kế hoạch truy vấn chọn một mục duy nhất được phân cụm cho một bộ sưu tập phân cụm, kết quả giải thích bao gồm giai đoạn

'$lookup': {   from: ,   as: ,   localField: ,   foreignField: },totalDocsExamined: ,totalKeysExamined: ,collectionScans: ,indexesUsed: [ , , ...,  ],nReturned: ,executionTimeMillisEstimate: 
43. Giai đoạn bao gồm thông tin về chỉ mục khóa được phân cụm và giới hạn chỉ mục. và trả lại kết quả chỉ bằng các phím chỉ mục; . e. MongoDB không cần kiểm tra tài liệu từ bộ sưu tập để trả về kết quả

Để biết thêm thông tin về thống kê thực thi quét thu thập, xem phân tích hiệu suất truy vấn. không phải con cháu của a

'$lookup': {   from: ,   as: ,   localField: ,   foreignField: },totalDocsExamined: ,totalKeysExamined: ,collectionScans: ,indexesUsed: [ , , ...,  ],nReturned: ,executionTimeMillisEstimate: 
7 giai đoạn và trong
'$lookup': {   from: ,   as: ,   localField: ,   foreignField: },totalDocsExamined: ,totalKeysExamined: ,collectionScans: ,indexesUsed: [ , , ...,  ],nReturned: ,executionTimeMillisEstimate: 
17
,
'$lookup': {   from: ,   as: ,   localField: ,   foreignField: },totalDocsExamined: ,totalKeysExamined: ,collectionScans: ,indexesUsed: [ , , ...,  ],nReturned: ,executionTimeMillisEstimate: 
199
is
'$lookup': {   from: ,   as: ,   localField: ,   foreignField: },totalDocsExamined: ,totalKeysExamined: ,collectionScans: ,indexesUsed: [ , , ...,  ],nReturned: ,executionTimeMillisEstimate: 
219.

Khi một mục bao gồm một truy vấn, MongoDB đều có thể khớp với các điều kiện truy vấn và trả về kết quả duy nhất bằng các từ khóa chỉ mục; . ______0173 mảng chi tiết các chỉ mục; . g.

'$lookup': {   from: ,   as: ,   localField: ,   foreignField: },totalDocsExamined: ,totalKeysExamined: ,collectionScans: ,indexesUsed: [ , , ...,  ],nReturned: ,executionTimeMillisEstimate: 
0

Khi một số chỉ bao gồm một truy vấn, kết quả giải thích có giai đoạn

'$lookup': {   from: ,   as: ,   localField: ,   foreignField: },totalDocsExamined: ,totalKeysExamined: ,collectionScans: ,indexesUsed: [ , , ...,  ],nReturned: ,executionTimeMillisEstimate: 
6 không phải là hậu duệ của giai đoạn
'$lookup': {   from: ,   as: ,   localField: ,   foreignField: },totalDocsExamined: ,totalKeysExamined: ,collectionScans: ,indexesUsed: [ , , ...,  ],nReturned: ,executionTimeMillisEstimate: 
7 and in
'$lookup': {   from: ,   as: ,   localField: ,   foreignField: },totalDocsExamined: ,totalKeysExamined: ,collectionScans: ,indexesUsed: [ , , ...,  ],nReturned: ,executionTimeMillisEstimate: 
17,
'$lookup': {   from: ,   as: ,   localField: ,   foreignField: },totalDocsExamined: ,totalKeysExamined: ,collectionScans: ,indexesUsed: [ , , ...,  ],nReturned: ,executionTimeMillisEstimate: 
199 is
'$lookup': {   from: ,   as: ,   localField: ,   foreignField: },totalDocsExamined: ,totalKeysExamined: ,collectionScans: ,indexesUsed: [ , , ...,  ],nReturned: ,executionTimeMillisEstimate: 
219. ______0173 mảng chi tiết các chỉ mục; . g.
'$lookup': {   from: ,   as: ,   localField: ,   foreignField: },totalDocsExamined: ,totalKeysExamined: ,collectionScans: ,indexesUsed: [ , , ...,  ],nReturned: ,executionTimeMillisEstimate: 
1

Đối với kế hoạch giao lộ chỉ mục, kết quả sẽ bao gồm giai đoạn

________ 049 hoặc giai đoạn ________ 050 với mảng ________ 0173 chi tiết các mục;

Nếu MongoDB sử dụng các mục chỉ cho biểu thức

'$lookup': {   from: ,   as: ,   localField: ,   foreignField: },totalDocsExamined: ,totalKeysExamined: ,collectionScans: ,indexesUsed: [ , , ...,  ],nReturned: ,executionTimeMillisEstimate: 
20, kết quả sẽ bao gồm giai đoạn

'$lookup': {   from: ,   as: ,   localField: ,   foreignField: },totalDocsExamined: ,totalKeysExamined: ,collectionScans: ,indexesUsed: [ , , ...,  ],nReturned: ,executionTimeMillisEstimate: 
53 với mảng
'$lookup': {   from: ,   as: ,   localField: ,   foreignField: },totalDocsExamined: ,totalKeysExamined: ,collectionScans: ,indexesUsed: [ , , ...,  ],nReturned: ,executionTimeMillisEstimate: 
173 chi tiết các mục;

Trong các phiên bản trước của MongoDB,

'$lookup': {   from: ,   as: ,   localField: ,   foreignField: },totalDocsExamined: ,totalKeysExamined: ,collectionScans: ,indexesUsed: [ , , ...,  ],nReturned: ,executionTimeMillisEstimate: 
2 đã trả lại mảng
'$lookup': {   from: ,   as: ,   localField: ,   foreignField: },totalDocsExamined: ,totalKeysExamined: ,collectionScans: ,indexesUsed: [ , , ...,  ],nReturned: ,executionTimeMillisEstimate: 
56 chi tiết các mục

đồng ruộng

Khi

'$lookup': {   from: ,   as: ,   localField: ,   foreignField: },totalDocsExamined: ,totalKeysExamined: ,collectionScans: ,indexesUsed: [ , , ...,  ],nReturned: ,executionTimeMillisEstimate: 
3 được chạy trong chế độ xác thực thi hoặc allplansexecution, các giai đoạn
'$lookup': {   from: ,   as: ,   localField: ,   foreignField: },totalDocsExamined: ,totalKeysExamined: ,collectionScans: ,indexesUsed: [ , , ...,  ],nReturned: ,executionTimeMillisEstimate: 
21 và
'$lookup': {   from: ,   as: ,   localField: ,   foreignField: },totalDocsExamined: ,totalKeysExamined: ,collectionScans: ,indexesUsed: [ , , ...,  ],nReturned: ,executionTimeMillisEstimate: 
0 có đầu ra bổ sung

Mô tả sự kiện

'$lookup': {   from: ,   as: ,   localField: ,   foreignField: },totalDocsExamined: ,totalKeysExamined: ,collectionScans: ,indexesUsed: [ , , ...,  ],nReturned: ,executionTimeMillisEstimate: 
21

'$lookup': {   from: ,   as: ,   localField: ,   foreignField: },totalDocsExamined: ,totalKeysExamined: ,collectionScans: ,indexesUsed: [ , , ...,  ],nReturned: ,executionTimeMillisEstimate: 
61

Dài

Sân khấu

'$lookup': {   from: ,   as: ,   localField: ,   foreignField: },totalDocsExamined: ,totalKeysExamined: ,collectionScans: ,indexesUsed: [ , , ...,  ],nReturned: ,executionTimeMillisEstimate: 
21

'$lookup': {   from: ,   as: ,   localField: ,   foreignField: },totalDocsExamined: ,totalKeysExamined: ,collectionScans: ,indexesUsed: [ , , ...,  ],nReturned: ,executionTimeMillisEstimate: 
26

boolean

Loại hình

'$lookup': {   from: ,   as: ,   localField: ,   foreignField: },totalDocsExamined: ,totalKeysExamined: ,collectionScans: ,indexesUsed: [ , , ...,  ],nReturned: ,executionTimeMillisEstimate: 
0

'$lookup': {   from: ,   as: ,   localField: ,   foreignField: },totalDocsExamined: ,totalKeysExamined: ,collectionScans: ,indexesUsed: [ , , ...,  ],nReturned: ,executionTimeMillisEstimate: 
67

Dài

Số lượng byte ước tính được xử lý trong giai đoạn

'$lookup': {   from: ,   as: ,   localField: ,   foreignField: },totalDocsExamined: ,totalKeysExamined: ,collectionScans: ,indexesUsed: [ , , ...,  ],nReturned: ,executionTimeMillisEstimate: 
21

'$lookup': {   from: ,   as: ,   localField: ,   foreignField: },totalDocsExamined: ,totalKeysExamined: ,collectionScans: ,indexesUsed: [ , , ...,  ],nReturned: ,executionTimeMillisEstimate: 
0

'$lookup': {   from: ,   as: ,   localField: ,   foreignField: },totalDocsExamined: ,totalKeysExamined: ,collectionScans: ,indexesUsed: [ , , ...,  ],nReturned: ,executionTimeMillisEstimate: 
26

boolean

Cho dù giai đoạn

'$lookup': {   from: ,   as: ,   localField: ,   foreignField: },totalDocsExamined: ,totalKeysExamined: ,collectionScans: ,indexesUsed: [ , , ...,  ],nReturned: ,executionTimeMillisEstimate: 
21 đã ghi cho đĩa

Kích thước ước tính tổng của tất cả các tài liệu bắt đầu theo giai đoạn

'$lookup': {   from: ,   as: ,   localField: ,   foreignField: },totalDocsExamined: ,totalKeysExamined: ,collectionScans: ,indexesUsed: [ , , ...,  ],nReturned: ,executionTimeMillisEstimate: 
0 trong byte

Nếu MongoDB yêu cầu sử dụng hơn 100 megabyte bộ nhớ hệ thống cho hoạt động sắp xếp, MongoDB sẽ trả về lỗi trừ khi truy vấn chỉ định