System, method and device for index compilation to optimize index usage

US10635666B2 · US · B2

Patent metadata
FieldValue
Publication numberUS-10635666-B2
Application numberUS-201715658028-A
CountryUS
Kind codeB2
Filing dateJul 24, 2017
Priority dateMar 21, 2015
Publication dateApr 28, 2020
Grant dateApr 28, 2020

How to read this patent

A practical reading order for non-experts. Skip the full description unless you need deep technical detail.

  1. Title

    What the patent document calls the invention.

  2. Abstract

    A short plain-language summary of the technical disclosure.

  3. Assignees and inventors

    Who owns or filed the patent and who is credited as inventor.

  4. Key dates

    Filing, priority, publication, and grant dates set the timeline.

  5. First independent claim

    The legal scope of protection — read this for what is actually claimed.

  6. CPC / IPC classifications

    Technology tags used to group this patent with similar filings.

  7. Citations and related patents

    Prior art links and similar publications in this corpus.

Abstract

Official abstract text for this publication.

Embodiments relate to a system, method, and device for index compilation to optimize index. Once a CREATE INDEX commands is fired, a first check determines if the user requested has to compile this index. If the index is to be compiled, a corresponding C-file is generated, and a DLL is generated out of the C-file. The DLL is then loaded with server. An INDEX DLL is natively compiled and generated corresponding to each INDEX during definition. The INDEX DLL will contain the required structure and method to perform on INDEX, based on the indexed column data-type.

First claim

Opening claim text (preview).

What is claimed is: 1. A device comprising: a transceiver configured to receive a query for querying a database; a processor configured to specify the query, wherein the query comprises a “CREATE INDEX” statement with a command to create a file by compiling an INDEX, for making data available from the database; and a memory coupled with the processor, wherein in response to the command to compile, the memory is configured to provide the processor with instructions to natively compile the query, in response to the command, to generate a C-file corresponding to each INDEX in the query, and thereby generate a shared object file, based on the C-file generated, wherein the C-file generated comprises a structure and a mechanism to perform an operation on an INDEX based on an indexed column in the database, wherein the shared object file is a dynamic link library file; wherein the generated C-file corresponding to each INDEX in the query is specific to a data-type of the indexed column in the database. 2. The device according to claim 1 , wherein the instructions to natively compile the query includes instructions to: create, based on the query received, the structure corresponding to the index; generate, based on the query received, an access function for an index tuple value, and a request to find an appropriate slot for an index tuple; store the structure created, the access function generated, and the access function generated in a buffer, and create the C-file based on the structure, the access function and the request; compile the C-file created using a pre-stored compiler; and wherein the memory includes further instructions to instruct the processor to load the C-file along with at least one executable files in the device for an execution of the query. 3. The device according to claim 1 , wherein the shared object file comprises a list of columns in the INDEX, an access function for an index tuple value, or an instruction to find an appropriate slot for an index tuple. 4. The device according to claim 1 , wherein the shared object file comprises a function pointer generated for the INDEX, wherein the function pointer is stored in a relation descriptor table. 5. The device according to claim 1 , wherein the C-file is generated based on the INDEX and the query received, and wherein the shared object file is generated by compiling the C-file generated. 6. The device according to claim 1 , wherein the shared object file is used by an application, or other dynamic link library. 7. The device according to claim 1 , wherein when the query is received, the instructions further comprise instructions to: check if the INDEX received along with the query is schema bounded, wherein a flag is provided to indicate if tuple belongs to a schema bounded index; and if the INDEX is schema bounded, utilize a function pointer stored into a corresponding relation descriptor associated with the INDEX, to call the shared object file generated for an execution of the query. 8. The device as claimed in in claim 1 , wherein the query is received in a format comprising CREATE INDEX query along with [COMPILE] option. 9. A method comprising: receiving, by a transceiver, a query for querying a database for making data available from the database; identifying, by a processor, the query, wherein the query comprises a “CREATE INDEX” statement with a command to create a file by compiling the INDEX; and natively compiling the query, by the processor, in response to the command, to generate a C-file corresponding to each INDEX in the query, and thereby generate a shared object file, based on the C-file generated, wherein the C-file comprises a structure and a mechanism to perform an operation on an INDEX based on an indexed column in the database, and wherein the shared object file is a dynamic link library file; wherein the generated C-file corresponding to each INDEX in the query is specific to a data-type of the indexed column in the database. 10. The method according to claim 9 , wherein natively compiling the query comprises: creating, by the processor, based on the query received, the structure corresponding to the index; generating, by the processor, based on the query received, specifically based on an INDEX definition given as part of CREATE INDEX command, an access function for an index tuple value, and an instruction to find an appropriate slot for an index tuple, wherein a number of access functions generated for each INDEX are always same; storing, by the processor, the structure created, the access function generated, and the access function generated in a buffer; creating, by the processor, the C-file based on the structure, the access function and the instruction; compiling, by the processor, the C-file created using a pre-stored compiler; and loading, by the processor, the C-file along with an executable file for an execution of the query. 11. The method according to claim 9 , wherein the shared object file comprises a list of columns in the INDEX, an access function for an index tuple value, or an instruction to find an appropriate slot for an index tuple. 12. The method according to claim 9 , wherein natively compiling the query comprises: creating, by the processor, a system table for the INDEX, and thereby storing an option for compiling the INDEX, wherein the option is selected from a “true” if the command to create the file is present in the query or “false” if the command to create the file is absent from the query. 13. The method according to claim 9 , wherein the shared object file comprises a function pointer generated for the INDEX, wherein the function pointer generated is stored in a relation descriptor table. 14. The method according to claim 9 , wherein natively compiling the query comprises: when the query has a command to compile the INDEX, generating the shared object file by compiling the C-file generated. 15. The method according to claim 9 , wherein the shared object file is used by an application or other dynamic link library. 16. The method according to claim 9 , wherein when the query is received, the method comprises: checking, by the processor, if the INDEX received along with the query is schema bounded, wherein a flag is provided to indicate if a tuple belongs to a schema bounded index; and if the INDEX is schema bounded, utilizing, by the processor, a function pointer stored into a corresponding relation descriptor associated with the INDEX, to call the shared object file generated for an execution of the query. 17. The method according to claim 9 , wherein the query is received in a format comprising CREATE INDEX query along with [COMPILE] option.

Assignees

Inventors

Classifications

  • Query optimisation · CPC title

  • Tablespace storage structures; Management thereof · CPC title

  • Compilation · CPC title

  • Dynamic linking or loading; Link editing at or after load time, e.g. Java class loading · CPC title

  • Indexing structures · CPC title

Patent family

Related publications grouped by family.

External sources

Frequently asked questions

Answers are generated from the same data shown on this page.

What does patent US10635666B2 cover?
Embodiments relate to a system, method, and device for index compilation to optimize index. Once a CREATE INDEX commands is fired, a first check determines if the user requested has to compile this index. If the index is to be compiled, a corresponding C-file is generated, and a DLL is generated out of the C-file. The DLL is then loaded with server. An INDEX DLL is natively compiled and generat…
Who is the assignee on this patent?
Huawei Tech Co Ltd
What technology area does this patent fall under?
Primary CPC classification G06F16/2453. Mapped technology areas include Physics.
When was this patent published?
Publication date Tue Apr 28 2020 00:00:00 GMT+0000 (Coordinated Universal Time) (B2). Legal status and post-grant events are not shown on this page.
What related patents are in patentsdb?
We list 8 related publications on this page (citations in our corpus or others sharing the same primary CPC).