Halaman ini memberikan ringkasan tentang cache data, rekomendasi kami tentang memilih workload untuk mengaktifkan cache data,
dan batasan penggunaan cache data.
Cache data adalah fitur opsional yang menyimpan halaman data di Solid State Drive (SSD) lokal berkecepatan tinggi untuk mempercepat pemrosesan kueri. Cache data memperluas cache halaman OS untuk menggunakan memori dan SSD lokal.
Saat Anda mengaktifkan cache data di instance Anda, berikut cara Cloud SQL
memproses permintaan baca dan tulis:
Permintaan baca: Cloud SQL memprioritaskan pembacaan data dari memori utama,
diikuti dengan cache data, kemudian penyimpanan instance.
Hal ini memungkinkan operasi baca diproses dengan latensi serendah mungkin.
Permintaan tulis: Cloud SQL meng-commit data ke penyimpanan instance
dan secara bersamaan menulisnya ke cache data.
Rekomendasi
Cache data menyediakan manfaat performa untuk jenis workload tertentu.
Sebaiknya Anda aktifkan cache data untuk jenis workload berikut:
Workload di mana set data yang berfungsi tidak muat di memori utama.
Menggunakan cache data dapat memberikan manfaat performa maksimum saat seluruh set data yang berfungsi tidak dapat dimuat di memori utama instance.
Dalam skenario ini, Cloud SQL menyimpan set data yang berfungsi di memori utama dan cache data.
Set data yang berfungsi umumnya lebih kecil daripada set data lengkap.
Workload dengan operasi baca yang lebih banyak daripada operasi tulis.
Gunakan cache data untuk workload yang sebagian besar terdiri dari operasi baca.
Batasan
Ketika cache data penuh, data yang disimpan akan dihapus berdasarkan analisis yang paling jarang
digunakan untuk mengakomodasi pembaruan selanjutnya pada cache data.
Operasi berikut pada instance akan menghapus konten cache data dan dapat menyebabkan penurunan performa saat cache data diisi ulang:
Pemeliharaan terencana
Penonaktifan yang tidak terduga (menghentikan instance)
Upgrade versi utama
Instance beralih dari zona ke regional atau dari regional ke zona
Perubahan pada jenis mesin untuk instance
Jumlah core CPU menentukan ukuran SSD. Anda tidak dapat mengubah ukuran SSD secara terpisah.
Caching terperinci (misalnya, caching tingkat tabel atau caching tingkat kueri) tidak didukung.
[[["Mudah dipahami","easyToUnderstand","thumb-up"],["Memecahkan masalah saya","solvedMyProblem","thumb-up"],["Lainnya","otherUp","thumb-up"]],[["Sulit dipahami","hardToUnderstand","thumb-down"],["Informasi atau kode contoh salah","incorrectInformationOrSampleCode","thumb-down"],["Informasi/contoh yang saya butuhkan tidak ada","missingTheInformationSamplesINeed","thumb-down"],["Masalah terjemahan","translationIssue","thumb-down"],["Lainnya","otherDown","thumb-down"]],["Terakhir diperbarui pada 2025-09-04 UTC."],[],[],null,["# Data cache overview\n\n\u003cbr /\u003e\n\n[MySQL](/sql/docs/mysql/data-cache \"View this page for the MySQL database engine\") \\| [PostgreSQL](/sql/docs/postgres/data-cache \"View this page for the PostgreSQL database engine\") \\| SQL Server\n\n\u003cbr /\u003e\n\n\n| **Note:** This page contains features related to Cloud SQL editions. For more information about Cloud SQL editions, see [Introduction to Cloud SQL editions](/sql/docs/sqlserver/editions-intro).\n\n\u003cbr /\u003e\n\nThis page provides an overview of data cache, our recommendations on choosing workloads on which to enable data cache,\nand the limitations of using a data cache.\n\nData cache is an optional feature that stores data pages on high-speed local solid state drives (SSD) to accelerate query processing. Data cache extends the OS page cache to use both the memory and the local SSD.\n\nYou can enable data cache when you [create an instance](/sql/docs/sqlserver/create-instance).\n\nTo change the data cache setting on your instance,\nsee [edit an instance](/sql/docs/sqlserver/edit-instance) and\n\n[instance settings](/sql/docs/sqlserver/instance-settings#data-cache-sqlserver).\n\n\nWhen you enable data cache on your instance, this is how Cloud SQL\nprocesses read and write requests:\n\n- Read request: Cloud SQL prioritizes reading data from the main memory,\n followed by the data cache, and then the instance's storage.\n This allows for the read operations to be processed with the lowest possible latency.\n\n- Write request: Cloud SQL commits the data to the instance's\n storage and simultaneously writes it to the data cache.\n\nRecommendations\n---------------\n\nData cache provides performance benefits for certain workload types.\nWe recommend that you enable data cache for the following workload types:\n\n- Workloads where the working dataset doesn't fit in the main memory. Using a data cache delivers maximum performance benefits when the entire working dataset can't fit in the instance's main memory.\n In this scenario, Cloud SQL stores the working dataset in the main memory and the data cache.\n The working dataset is generally smaller than the full dataset.\n\n- Workloads with more read operations than write operations. Use a data cache for workloads that are predominantly made up of read operations.\n\n| **Note:** When you switch an instance from Cloud SQL Enterprise Plus edition to Cloud SQL Enterprise edition, data cache is automatically disabled. Switching an instance to Cloud SQL Enterprise edition incurs some downtime.\n\nLimitations\n-----------\n\n- When a data cache becomes full, it removes the stored data based on the least recently used analysis to accommodate subsequent updates to the data cache.\n\n\u003c!-- --\u003e\n\n- The following operations on the instance erase the contents of the data cache and can lead to a drop in performance while the data cache is repopulated:\n - Planned maintenance\n - An unexpected shutdown (stopping the instance)\n - A major version upgrade\n - The instance switching from zonal to regional or from regional to zonal\n - A change to the machine type for the instance\n- The number of CPU cores determines the size of the SSD. You can't resize the SSD independently.\n- Fine-grained caching (for example, table-level caching or query-level caching) isn't supported.\n\n\u003c!-- --\u003e\n\n- The data cache doesn't use the [buffer pool extension](https://learn.microsoft.com/en-us/sql/database-engine/configure-windows/buffer-pool-extension?view=sql-server-ver16)."]]