IP Library Granted Patent US 11,886,401
Granted Patent B2
US 11,886,401 · App. 17/647,570 · Granted Jan 30, 2024

Database key compression

Inventors: Rohit Agrawal (San Francisco, CA); Aditya Dharmanand Shetty (San Francisco, CA); Thomas Fanghaenel (Oakland, CA)
Assignee: Salesforce, Inc.
G06F16/215G06F16/2246G06F16/2272H03M7/30
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 11,886,401
App. No.
17/647,570
Granted
Jan 30, 2024
Kind
B2
Abstract

Techniques are disclosed relating to compressing database keys. A computer system may receive a request to write a database record to a storage medium. The database record may include a database key and a corresponding data value. The computer system may compress the database key by replacing a portion of the database key with particular data that identifies a location of a reference database key and an amount of similarity determined between the database key and the reference database key. The computer system may write the database record to the storage medium. The database record may include the compressed database key and the corresponding data value.

Claims (57)

1. A method, comprising:

receiving a request for a database record stored on a storage medium, wherein the database record includes a compressed database key having information that specifies:

a location of a reference database key; and

an amount of similarity between the reference database key and an uncompressed version of the compressed database key;

accessing the reference database key based on the location specified by the compressed database key;

decompressing the compressed database key based on the reference database key and the amount of similarity; and

returning the database record with the decompressed database key.

2. The method of claim 1 , wherein the database record is written to a data block that stores a set of database records, and wherein the reference database key is stored in one of a plurality of index blocks that comprise an index associated with the data block.

3. The method of claim 2 , wherein the information includes a first portion that specifies the index block and a second portion that specifies an entry within the index block that stores the reference database key.

4. The method of claim 1 , wherein the amount of similarity indicates an amount of bytes that are contiguously shared, starting from an initial byte position, between the reference database key and the uncompressed version of the compressed database key.

5. The method of claim 1 , further comprising:

compressing the uncompressed version of the compressed database key, including:

based on determining that the database record is the logical first database record in a set of database records, adding the reference database key to a set of reference database keys that is maintained by a computer system that performs the method.

6. The method of claim 1 , wherein an uncompressed version of another database key shares a different amount of similarity with the reference database key than the uncompressed version of the compressed database key.

7. The method of claim 1 , wherein the database record is included in a set of database records having database keys that define a particular database key-sorted order, and wherein compressed versions of the database keys defined the same particular database key-sorted order.

8. A non-transitory computer readable medium having program instructions stored thereon that are capable of causing a computer system to perform operations comprising:

receiving a request for a database record stored on a storage medium, wherein the database record includes a compressed database key having information that specifies:

a location of a reference database key; and

an amount of similarity between the reference database key and an uncompressed version of the compressed database key;

accessing the reference database key based on the location specified by the compressed database key;

decompressing the compressed database key based on the reference database key and the amount of similarity; and

returning the database record with the decompressed database key.

9. The medium of claim 8 , wherein the operations further comprise:

writing the database record to a data block that stores a set of database records; and

writing the reference database key to one of a plurality of index blocks that define an index associated with the data block.

10. The medium of claim 9 , wherein the information includes a first portion that specifies the index block and a second portion that specifies an entry within the index block that stores the reference database key.

11. The medium of claim 8 , wherein the amount of similarity indicates a number of characters that are contiguously shared, from an initial character position, between the reference database key and the uncompressed version of the compressed database key.

12. The medium of claim 8 , wherein the operations further comprise:

receiving a request to store the database record on the storage medium;

compressing the uncompressed version of the database key by replacing a portion of the database key with data that identifies the location of the reference database key and the amount of similarity; and

storing the database record with the compressed database key.

13. The medium of claim 8 , wherein the database record is written to a file of a particular level of a log-structured merge-tree (LSM tree), wherein the LSM tree includes multiple levels storing files, and wherein the reference database key is specific to the particular level.

14. The medium of claim 8 , wherein the operations further comprise:

receiving a request for a different database record;

accessing the reference database key;

decompressing a database key of the different record based on the reference database key and a different amount of similarity; and

returning the different database record.

15. A system, comprising:

at least one processor; and

memory having program instructions stored thereon that are executable by the at least one processor to cause the system to perform operations comprising:

receiving a request for a database record stored on a storage medium, wherein the database record includes a compressed database key having information that specifies:

a location of a reference database key; and

an amount of similarity between the reference database key and an uncompressed version of the compressed database key;

accessing the reference database key based on the location specified by the compressed database key;

decompressing the compressed database key based on the reference database key and the amount of similarity; and

returning the database record with the decompressed database key.

16. The system of claim 15 , wherein the operations further comprise:

writing the database record to a data block and the reference database key to an index block that is separate from the data block.

17. The system of claim 16 , wherein the operations further comprise:

prior to receiving the request, compressing the uncompressed version of the database key based on the reference database key, wherein the compressing includes replacing a portion of the database key with a first portion that specifies the index block and a second portion that specifies an entry within the index block that stores the reference database key.

18. The system of claim 16 , wherein the writing includes storing, with the reference database key, pointer information that identifies the data block that stores the database record.

19. The system of claim 15 , wherein the amount of similarity indicates an amount of bytes that are contiguously shared, starting from an initial byte position, between the reference database key and the uncompressed version of the compressed database key.

20. The system of claim 15 , wherein the operations further comprise:

receiving a request for a different database record;

accessing the reference database key;

decompressing a database key of the different record based on the reference database key and the amount of similarity; and

returning the different database record.

Assignments (2)
CHANGE OF NAME Recorded Dec 19, 2023
From: SALESFORCE.COM, INC.
To: SALESFORCE, INC.
Reel/Frame 066075/0281 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Jan 10, 2022
From: AGRAWAL, ROHIT; SHETTY, ADITYA DHARMANAND; FANGHAENEL, THOMAS
To: SALESFORCE.COM, INC.
Reel/Frame 058610/0720 →
Continuity (2)
Continuation 16457842 · Jun 28, 2019
Related Publication 20220129428A1 · Apr 28, 2022