Computer >> บทช่วยสอนคอมพิวเตอร์ >  >> การเขียนโปรแกรม >> MongoDB

ตรวจสอบ Storage Engine ที่ใช้ใน MongoDB

ใช้ db.serverStatus().storageEngine

คำสั่ง db.serverStatus().storageEngine แสดงชื่อและคุณสมบัติของ Storage Engine ที่กำลังทำงาน

ตัวอย่าง

> db.serverStatus().storageEngine;

ผลลัพธ์:

{
    "name" : "wiredTiger",
    "supportsCommittedReads" : true,
    "supportsSnapshotReadConcern" : true,
    "readOnly" : false,
    "persistent" : true
}

Storage Engine เริ่มต้นของ MongoDB ตั้งแต่เวอร์ชัน 3.2 คือ WiredTiger

ดูรายละเอียดการตั้งค่า WiredTiger

> db.serverStatus().wiredTiger;

จะแสดงสถิติและการตั้งค่าระดับละเอียด เช่น cache, checkpoint, compression, transaction logs เป็นต้น ซึ่งมีประโยชน์สำหรับการปรับประสิทธิภาพและตรวจสอบสถานะระบบ