Method and apparatus for storing data
The present disclosure discloses a method and apparatus for storing data. A specific embodiment of the method includes: judging whether a remaining storage space in a compressed data page is greater than a storage space threshold, in response to to-be-stored data to be written to the compressed data...
Gespeichert in:
Hauptverfasser: | , |
---|---|
Format: | Patent |
Sprache: | eng |
Schlagworte: | |
Online-Zugang: | Volltext bestellen |
Tags: |
Tag hinzufügen
Keine Tags, Fügen Sie den ersten Tag hinzu!
|
Zusammenfassung: | The present disclosure discloses a method and apparatus for storing data. A specific embodiment of the method includes: judging whether a remaining storage space in a compressed data page is greater than a storage space threshold, in response to to-be-stored data to be written to the compressed data page in a cache storage region of a database; if not, determining a non-compressed data page among the non-compressed data pages for generating the compressed data page; and compressing the determined non-compressed data page to generate the compressed data page. This embodiment achieves the generation of the compressed data page in advance, such that each time the data is written to the compressed data page, it is ensured that there is enough storage space in the compressed data page to store the written data, thus reducing the system overhead when writing the data to the compressed data page, enhancing the writing efficiency of the system. |
---|