Accelerator and acceleration method for database
By designing an accelerator in the database, generating skip information to filter unnecessary columns, the problem of data growth in the database increases in query processing time, and the improvement of query processing efficiency is achieved.
Patent Information
- Application Number
- CN202411087711.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Priority Date
- 2023-11-17
- Filing Date
- 2024-08-09
- Publication Date
- 2025-02-21
AI Technical Summary
With the continuous growth of data in databases, the time required to process queries is also increasing, and it is difficult for the prior art to effectively accelerate query processing in sparse databases.
An accelerator is designed to generate skip information by processing information about database columns and queries to perform column filtering when using the database to process queries, reducing unnecessary data processing.
By generating and using skip information, the time required to process queries is significantly reduced and the efficiency of database queries is improved.
Smart Images

Figure CN119493783A_ABST
Abstract
Description
[0001] This application claims the benefit of U.S. Provisional Patent Application No. 63 / 532,672, filed on August 14, 2023, and U.S. Patent Application No. 18 / 513,501, filed on November 17, 2023, which are incorporated herein by reference for all purposes. Technical Field
[0002] The disclosure relates generally to databases, and more particularly to accelerating queries in sparse databases. Background Art
[0003] The size of databases continues to grow. As more and more data is added to the database, searching the database to process a query may involve processing larger and larger amounts of data, which may take more time.
[0004] There is still a need for improvement in handling queries in the database. Summary of the invention
[0005] The accelerator may process information about columns in a database and a query to generate skip information that may be used when processing the query using the database.
[0006] According to a disclosed embodiment, an accelerator is provided, comprising: an interface to a first storage device, the first storage device being used to store a database, the database comprising a first column, a second column, a third column and a fourth column; a second storage device being used to store first information about the first column of the database, second information about the second column of the database, third information about the third column of the database and fourth information about the fourth column of the database; and a first circuit being used to process the first information, the second information, the third information, the fourth information and a query to generate skip information.
[0007] According to a disclosed embodiment, a method for database acceleration is provided, the method comprising: receiving a query of a database at an accelerator; identifying a first column of the database and a second column of the database based at least in part on the query; identifying a third column of the database and a fourth column of the database based at least in part on the first column and the second column; and generating skip information by the accelerator based at least in part on the third column and the fourth column.
[0008] According to a disclosed embodiment, a method for database acceleration is provided, the method comprising: receiving a query of a database at an accelerator; filtering columns in the database using a column filter based at least in part on skip information; and processing the query based at least in part on the query, the database, and the column filter. BRIEF DESCRIPTION OF THE DRAWINGS
[0009] The drawings described below are examples of how the disclosed embodiments may be implemented and are not intended to limit the disclosed embodiments. A single disclosed embodiment may include elements not shown in a particular drawing and / or may omit elements shown in a particular drawing. The drawings are intended to provide illustrations and may not be to scale.
[0010] Figure 1 A machine including an accelerator for generating skip information according to the disclosed embodiments is shown.
[0011] Figure 2 Showing the embodiment according to the disclosure Figure 1 Details of the machine.
[0012] Figure 3 Showing the embodiment according to the disclosure Figure 1 Details of the accelerator.
[0013] Figure 4 The identification according to the disclosed embodiment is shown in the processing Figure 3 Columns that may be skipped when querying Figure 3 circuit.
[0014] Figure 5 According to the disclosed embodiment, Figure 3 How to align data in the database.
[0015] Figure 6 Showing the embodiment according to the disclosure Figure 1 Accelerator generation Figure 3 A flowchart of an example process for skipping information.
[0016] Figure 7 Showing the embodiment according to the disclosure Figure 1 The accelerator generates and stores Figure 3 A flowchart of an example process for skipping information.
[0017] Figure 8 Showing the embodiment according to the disclosure Figure 3 The skip circuit is established Figure 3 A flowchart of an example process for skipping information.
[0018] Fig. 9 The use of the disclosed embodiment is shown Figure 3 Database processing Figure 3 When querying Figure 3 The column filter uses Figure 3 A flowchart of an example process for skipping information.
[0019] Fig.10 Showing the embodiment according to the disclosure Figure 3 Column filter loading Figure 3A flowchart of an example process for skipping information. DETAILED DESCRIPTION
[0020] Reference will now be made in detail to the disclosed embodiments, examples of which are shown in the accompanying drawings. In the following detailed description, many specific details are set forth to enable a thorough understanding of the disclosure. However, it should be understood that one of ordinary skill in the art may practice disclosure without these specific details. In other cases, well-known methods, processes, components, circuits, and networks are not described in detail to avoid unnecessarily obscuring aspects of the embodiments.
[0021] It will be understood that although the terms first, second, etc. may be used herein to describe various elements, these elements should not be limited by these terms. These terms are only used to distinguish one element from another element. For example, a first module may be referred to as a second module, and similarly, a second module may be referred to as a first module without departing from the scope of the disclosure.
[0022] The terms used in the disclosed description herein are only used for the purpose of describing specific embodiments, and are not intended to limit disclosure. As used in the disclosed description and the appended claims, unless the context clearly indicates otherwise, the singular form is also intended to include the plural form. It will also be understood that the term "and / or" as used herein represents and covers any and all possible combinations of one or more of the associated listed items. It will also be understood that when used in this specification, the terms "including" and / or "comprising" illustrate the presence of the features, wholes, steps, operations, elements and / or components set forth, but do not exclude the presence or addition of one or more other features, wholes, steps, operations, elements, components and / or their groups. The components and features of the accompanying drawings are not necessarily drawn to scale.
[0023] Users (or applications) can submit queries to the database. These queries can be used to identify data that the user (or application) is interested in so that the requested data can be returned.
[0024] But databases continue to grow, both in terms of the number of entries in the database and the amount of information stored in each entry. A query may not be interested in all the data in the entries in the database. For example, consider a state database that stores information about all registered drivers. Such a database may store each driver's first and last name, their street address, their city, their zip code, their height, their weight, their hair color, and their driver's license number. Searching the database to find a particular person's city of residence may involve checking the driver's first and last name and their city, but not their street address, zip code, height, weight, hair color, or driver's license number. But all of this information may need to be parsed to find their city of residence.
[0025] The disclosed embodiments can improve query processing by providing information about how to skip information that is not relevant to the query. Columns that are not of interest can be marked as being skipped. Specifically, fixed-width columns that are not relevant to the query can be marked as being skipped as a group, speeding up the location of columns of interest in a particular query. To skip groups of columns, skip information can be used to indicate the first column (or starting column) to be skipped, the number of columns to be skipped, and the overall width of the group of columns to be skipped.
[0026] Figure 1 A machine including an accelerator for generating skip information according to a disclosed embodiment is shown. Figure 1 In the present invention, machine 105 (also referred to as a host or system) may include processor 110, memory 115, and storage device 120. Processor 110 may be any kind of processor. Processor 110 may also be referred to as a host processor. (For ease of illustration, processor 110 and other components discussed below are shown external to the machine: the disclosed embodiments may include these components within the machine.) Although Figure 1 A single processor 110 is shown, but the machine 105 may include any number of processors, each of which may be a single-core or multi-core processor, each of which may implement a reduced instruction set computer (RISC) architecture or a complex instruction set computer (CISC) architecture (among other possibilities), and may be mixed in any desired combination.
[0027] The processor 110 may be coupled to a memory 115. The memory 115 may be any kind of memory (such as dynamic random access memory (DRAM), static random access memory (SRAM), persistent random access memory, ferroelectric random access memory (FRAM) or non-volatile random access memory (NVRAM) (such as magnetoresistive random access memory (MRAM)), flash memory, etc.). The memory 115 may be a volatile memory or a non-volatile memory as desired. The memory 115 may also be any desired combination of different memory types and may be managed by a memory controller 125. The memory 115 may be used to store what may be referred to as "short-term" data: that is, data that is not expected to be stored for a long time. Examples of short-term data may include temporary files, data used locally by an application (which may have been copied from other storage locations), etc.
[0028] The processor 110 and the memory 115 may also support an operating system under which various applications may run. These applications may issue requests (also referred to as commands) to read data from any of the memories 115 or write data to any of the memories 115.
[0029] Storage device 120 may be used to store what may be referred to as "long-term" data: that is, data that is desired to be stored for a longer period of time, or that does not need to be stored in memory 115. Storage device 120 may be accessed using device driver 130. Although Figure 1 One storage device 120 is shown, but any number (one or more) of storage devices may be present in machine 105 .
[0030] The disclosed embodiments may include any desired mechanism for communicating with the storage device 120. For example, the storage device 120 may be connected to one or more buses (such as a Peripheral Component Interconnect Express (PCIe) bus), or the storage device 120 may include an Ethernet interface or some other network interface. Among other possibilities, other potential interfaces and / or protocols to the storage device 120 may include Non-Volatile Memory Express (NVMe), NVMe over Network Fabric (NVMe-oF), Remote Direct Memory Access (RDMA), Transmission Control Protocol / Internet Protocol (TCP / IP), Universal Flash Storage (UFS), Embedded Multimedia Card (eMMC), InfiniBand, Serial Attached Small Computer System Interface (SCSI) (SAS), Internet SCSI (iSCSI), Serial Advanced Technology Attachment (SATA), and cache coherent interconnect protocols (such as Compute Express Link (CXL) protocol).
[0031] Although Figure 1 The generic term "storage device" is used, but the disclosed embodiments may include any storage device format that may benefit from the use of a computational storage unit, examples of which may include hard disk drives and solid-state drives (SSDs). Any reference to "SSD" below should be understood to include such other embodiments disclosed.
[0032] The machine 105 may also include an accelerator 135, which may support executing commands in locations other than the processor 110. In this way, the accelerator 135 may help reduce the load on the processor 110. In some disclosed embodiments, the accelerator 135 may process queries submitted to a database stored on the storage device 120 of the machine 105. The accelerator 135 may be placed closer to the storage device 120 to support near-data processing. Performing near-data processing may reduce the time required to execute commands (executing commands on data on the storage device 120 may be faster than "transferring data from the storage device 120 to the memory 115, having the processor 110 execute the command on the data in the memory 115, and then transferring the data from the memory 115 back to the storage device 120").
[0033] In some disclosed embodiments, the accelerator 135 may be implemented as a circuit. Examples of such circuits may include, among other possibilities, a field programmable gate array (FPGA), an application specific integrated circuit (ASIC), a system on a chip (SoC), a central processing unit (CPU), a graphics processing unit (GPU), a general purpose GPU (GPGPU), a neural processing unit (NPU), or a tensor processing unit (TPU).
[0034] Although Figure 1 The storage device 120 and the accelerator 135 are shown as separate components, but the disclosed embodiments may combine these components into a single integrated unit. For example, the storage device 120 may include the accelerator 135 as a circuit such as an FPGA implemented within the storage device 120 (e.g., perhaps as part of a controller of the storage device 120).
[0035] Figure 2 Showing the embodiment according to the disclosure Figure 1 Details of the machine. Figure 2 , the machine 105 typically includes one or more processors 110, which may include a memory controller 125 and a clock 205, which may be used to coordinate the operation of the components of the machine. The processor 110 may also be coupled to a memory 115, which may include, by way of example, a random access memory (RAM), a read-only memory (ROM), or other state preservation medium. The processor 110 may also be coupled to a storage device 120 and a network connector 210, which may be, for example, an Ethernet connector or a wireless connector. Among other possibilities, the processor 110 may also be connected to a bus 215, to which a user interface 220 and an input / output (I / O) interface port may be attached, which may be managed using an I / O engine 225.
[0036] Figure 3 Showing the embodiment according to the disclosure Figure 1 Details of the accelerator 135. Figure 3 In FIG. 1 , accelerator 135 is shown connected to storage device 120 via connection (or interface) 305, which may store database 310. Database 310 may include data organized into tables. Queries (such as query 315) may be submitted to database 310 and processed by circuitry 320, with the results of query 315 being returned to the entity that submitted query 315 (the entity being a user or in Figure 1 applications running on machine 105).
[0037] Query 315 may be a query that requests specific data from a specific entry in database 310. For example, consider a state database containing information about persons registered in the state to operate motor vehicles. The database may contain information such as the driver's first name, the driver's last name, the driver's street address, the driver's city of residence, the driver's zip code, the driver's license identification number, the driver's weight, the driver's height, the driver's eye color, the driver's hair color, etc. All of this information may be related, but is not necessarily related to any particular person at any time.
[0038] Continuing with the previous example, consider a user who is interested in identifying all drivers who live in a particular zip code. The user may submit a query to such a database asking for the first and last names stored in the database and associated with a particular zip code. The user may not be concerned with the driver's street address, height, weight, eye color, hair color, etc.
[0039] The column in the query that identifies the entry of interest in the database (in this example, the city of residence) can be called a selection column because it selects / they select the entry in the database. The column in the query that includes the data sought by the user (in this example, the first and last names of people who live in that city) can be called a pick column because it picks / they pick the data the user seeks. All other columns in the database are irrelevant to the query: even those columns may not appear to be in the database. Queries that use relatively few columns of the database as selection columns or pick columns can be called "sparse queries."
[0040] In some disclosed embodiments, database 310 may be constructed in such a way that processing a query 315 on database 310 may involve considering every column in database 310, even if some of those columns are not relevant to query 315. However, looking at each column may require some processing cycles. Even if looking at a column only takes two processing cycles, multiplying those two processing cycles by the number of columns in database 310, and then by the number of entries of interest in database 310, the number of processing cycles spent processing columns of no interest may add up to a significant amount of time. For example, if database 310 includes 1,000,000 entries of data and 16 columns, even if query 315 only identifies 100,000 entries of interest, processing the query may require 3,200,000 processing cycles. Even for a computer that can process four cycles per nanosecond (ns), 3,200,000 processing cycles equals approximately one millisecond (ms): a not insignificant amount of time in computer terms. Note that this example database 310 is for illustration purposes only: database 310 may include any number of entries and any number of columns without limitation.
[0041] The accelerator 135 may improve processing efficiency by identifying columns that are not relevant to the query 315 and may be skipped when processing the query 315. By skipping columns in a group, processing of the query 315 may be performed more efficiently.
[0042] The accelerator 135 may include various components such as a control and status register (CSR) 325, a circuit 330, a storage device 335, and a column filter 340. To distinguish the circuit 330 from the circuit 320, the circuit 330 may be referred to as a skip circuit 330, and the circuit 320 may be referred to as a query processing circuit 320. The skip circuit 330 and the query processing circuit 320 may perform different functions: the skip circuit 330 may identify which columns in the database 310 may be skipped, and the query processing circuit 320 may process the query 315 using the database 310 to return results to the entity that submitted the query 315.
[0043] CSR 325 may be a register or other storage device such as various read-only modules (ROMs) such as programmable ROM (PROM), erasable PROM (EPROM), electrically erasable PROM (EEPROM), and others. CSR 325 may also be a register or other storage device such as the one described above with reference to FIG. Figure 1 The memory 115 may be in the form of various RAMs discussed above, or a non-volatile storage device such as a hard drive or SSD. In addition, the CSR 325 may be external to the accelerator 135: for example, the CSR 325 may be part of the storage device 120.
[0044] CSR 325 may store information about the structure of database 310. For example, Figure 4 , Figure 3 The CSR 325 may store information such as that shown in Table 405, which may provide information about Figure 3 The information about the structure of the database 310: that is, the number of columns and whether each column stores fixed-width data or variable-width data. (The information about which columns are valid or invalid can be based on Figure 3 Query 315, not about Figure 3 database 310 itself, which is why the valid information / invalid information in table 405 is shown with dotted lines). Figure 4 4, table 405 is shown as including information about 16 columns identified as columns 410-1 through 410-16 (which may be collectively referred to as columns 410). Columns 410-2, 410-3, 410-8, 410-12, 410-14, and 410-15 are shown as storing variable width data; the remaining columns are shown as storing fixed width data. Fixed width data may be regardless of Figure 3The entries in the database 310 may have constant (fixed) width data, while variable width data may have a width that can vary between Figure 3 The data that differs between or among entries in the database 310 of FIG. 410. In the case where the columns 410 have variable widths, header information in the column 410 of an entry may indicate how wide the data in the column 410 of the entry is.
[0045] As an example of fixed-width data versus variable-width data, consider again a state database containing information about people registered to operate motor vehicles. Even considering the most extreme cases for height and weight, a person's height is probably no taller than 96 inches, and a person's weight is probably no heavier than 1000 pounds. Because a person's height or weight might include fractions of an inch or a pound, these numbers might be stored as floating-point numbers. A floating-point number might require two bytes or four bytes of space to store, but a floating-point number can be used to store any height or weight, which means that Figure 3 The height and weight columns in the database 310 of may be fixed width columns. Similarly, storing a person's age may be represented using one or two bytes: no one is known (outside of a biblical context) to live longer than about 120 years. Therefore, a person's age may also be represented using fixed width data.
[0046] On the other hand, if the state database stores a person's nationality (that is, the country of which the person is considered a citizen), the country names vary in width from short (such as "Chad") to long (such as "United Kingdom of Great Britain and Northern Ireland"), and variations in between. While such data could be stored in a fixed-width column by ensuring that the column width is large enough for all possible values, such an arrangement is wasteful since relatively few entries would likely use the full column width. It may therefore be more efficient to store such information in a variable-width column so that sufficient space is provided for any data stored in the column without waste.
[0047] Return to Figure 3 , the skip circuit 330 may obtain information from the CSR 325 and the query 315 (such as, Figure 4 405), and use them to generate skip information. (Query 315 in Figure 3315 is shown in two places in the accelerator 135 only to illustrate that it is used in different ways by different components, and does not indicate that the accelerator 135 receives the query 315 from two different sources in two different ways). Skip information, such as skip information 345, may provide hints that the column filter 340 may use when the circuit 320 processes the query 315. The skip information 345 may include information such as the start column 350 (the first column in the group to be skipped), the number of columns 355 (the number of columns in the group to be skipped), and the data width 360 (the total width of the data in the database 310 to be skipped).
[0048] The skip information 345 may be stored in a storage device 335. The storage device 335 may be a volatile memory or a non-volatile memory (such as a Figure 1 115). Storage device 335 may be external to accelerator 135, similar to CSR 325: for example, storage device 335 may be part of storage device 120. By storing skip information 345 in storage device 335, column filter 340 may access skip information 345 whenever it is ready to access skip information 345, and may use skip information 345 to skip columns from database 310 that are not relevant to query 315.
[0049] As an example of how skip information 345 may be generated, return to Figure 4 .exist Figure 4 In the example, table 405 includes valid information / invalid information. For example, a flag such as "A" (as shown) may be used to indicate that the column is a valid column, and a flag such as "I" (as shown) may be used to indicate that the column is an invalid column. The valid information / invalid information identifies which columns are associated with Figure 3 The query 315 is related and which columns are related to Figure 3 The query 315 is not relevant. Figure 4 In the example, valid columns (such as columns 410-1, 410-2, 410-3, 410-13, 410-14, 410-15, and 410-16) can be associated with Figure 3 Query 315 is related: For example, these columns can be Figure 3 The remaining columns 410 are invalid: they are not related to Figure 3 315 are not relevant. Therefore, column filter 340 may skip those columns when providing information to query processing circuit 320.
[0050] Figure 4Also shown is how skip circuit 330 is used to process the information in table 405 to generate modified table 415. Skip circuit 330 can identify which columns 410 are valid and which columns are invalid (as shown attached to table 405). Figure 3 The columns referenced in query 315 are compared to determine which columns 410 are valid or invalid: Figure 3 The columns referenced in query 315 may be valid columns, and all remaining columns may be invalid columns. Figure 3 The query processing circuit 320 may use the modified table 415 to be able to convert from Figure 3 The data received by the database 310 (such as by Figure 3 The column filter 340 (filtered) is matched with the appropriate column in the modified table 415.
[0051] Once skip circuit 330 has identified which columns are invalid, skip circuit 330 may identify groups of invalid columns of fixed width. For example, columns 410-4, 410-5, 410-6, and 410-7 form one such group, as do columns 410-9, 410-10, and 410-11. Note that while columns 410-8 and 410-12 are marked as invalid, these columns store variable width data, which means that the amount of data to be skipped may be determined by examining the data itself: the data width may vary from entry to entry.
[0052] Once skip circuit 330 has identified such an invalid fixed-width column group, circuit 330 may generate Figure 3 The skip information 345 of FIG. 420 - 4 and 420 - 9 are examples of such skip information. For example, the skip information 420 - 4 indicates that column 3 is the first column (or starting column) to be skipped, and a total of four columns will be skipped (indicated as Hint+4). The data width of the group of skipped columns may be shown as F (length): F may indicate that the group of columns stores fixed-width data, and the length may indicate the total storage space used by the columns in the group. Similarly, the skip information 420 - 9 indicates that column 8 is the beginning of the group of columns to be skipped, and a total of three columns will be skipped with the indicated total data width.
[0053] Note that skip information (such as skip information 420-4 and 420-9) may be stored as separate information (such as Figure 3 The skip information 345 of the embodiment of the disclosure may be integrated into the modified table 415. Figure 3 The skip information 345 and Figure 4 Other optional methods of skipping information 420-4 and 420-9. Figure 3Only show Figure 3 A skip message 345, but the disclosed embodiments may include Figure 3 Any amount of skip information 345.
[0054] about Figure 4 Several points are worth mentioning. First, although Figure 4 It may be indicated that each fixed-width column uses the same data width, but the disclosed embodiments can support different data widths for columns of different fixed widths. That is, as long as the columns have a consistent width, there is no requirement to Figure 3 All fixed-width columns in database 310 have the same data width. For example, table 405 can be expanded to indicate the actual width of each fixed-width column: perhaps by indicating the width as part of whether the column is fixed width or variable width. For example, if the column has a fixed width, the width of the column can be specified numerically in the Fixed / Variable field (in bits, bytes, or any other desired units). If the column has a variable width, a flag such as "V" (as shown) can be used to indicate that the column is variable width.
[0055] Second, while all invalid fixed-width columns in table 405 are part of a group that can be skipped together, in some disclosed embodiments, there may be a single invalid fixed-width column that is not part of a group (because its neighboring columns are valid, variable-width, or both). For example, if column 410-16 is for Figure 3 What if query 315 is also identified as invalid? Although it is possible to generate a query for a single invalid fixed-width column Figure 3 The skip information 345 of FIG. 345 may be generated, but the benefit of doing so may not be significant. For example, if two processing cycles are spent to process a single column or group of columns to be skipped, then by generating a skip information 345 for a single column, the benefit of doing so may not be significant. Figure 3 The skip information 345 may not improve efficiency much. (Note, however, that this analysis does not take into account Figure 3 The efficiency of the query processing circuit 320 is: Figure 3 Column filter 340 can filter Figure 3 The query 315 does not require data, then Figure 3 The query processing circuitry 320 may have less data to process, so some efficiency may still be gained by filtering such columns. Figure 3 Column filter 340 processing Figure 3 A single fixed-width column with skip information 345 may require the same number of processing cycles as the number of processing cycles required to process Figure 3 The same as a single fixed-width column with no skip information 345).
[0056] Return to Figure 3, column filter 340 may use skip information 345 generated by skip circuitry 330. Because skip information 345 may be generated based in part on query 315, column filter 340 may trust that data in columns identified in skip information 345 may be skipped without affecting the results of query 315. Thus, when column filter 340 receives data from database 310 (via storage device 120 and connection (or interface) 305), column filter 340 may remove data that is not relevant to query 315 before passing the data to query processing circuitry 320, simplifying processing performed by query processing circuitry 320. Continuing with the above example of using two processing cycles per column per entry, column filter 340 may identify and filter columns based on skip information 345 in two processing cycles. When compared to columns that may be used for processing Figure 4 The six processing cycles for the three columns of skip information 420-9 may be used to process Figure 4 Column filter 340 may save 10 processing cycles (two cycles for processing the skipped columns, compared to 14 processing cycles for processing all seven columns) when compared to eight processing cycles for processing the four columns in skipped information 420-4. Figure 4 4 and 420 - 9 ). Therefore, column filter 340 can save 10 processing cycles out of 32 processing cycles: an improvement of approximately 31%.
[0057] In some disclosed embodiments, the skip circuit 330 may process the query 315 in parallel with the data being passed from the database 310 to the column filter 340. That is, even while the skip circuit 330 may be processing the query 315 to generate the skip information 345, the column filter 340 may be filtering the data received from the database 310. Although it may seem more efficient for the column filter 340 to wait until the skip information 345 has been generated before filtering the data from the database 310, it may actually be more efficient for the column filter 340 to begin its operation without first receiving the skip information 345. In this way, the query processing circuit 320 may begin its processing of the relevant data from the database 310 more quickly. Then, when the skip information 345 is available to the column filter 340, the column filter 340 may more quickly use the skip information to identify the columns in the database 310 that are to be skipped.
[0058] Refer to above Figure 3 to Figure 4 Description of the discussion Figure 4 How wide the various columns 410 can be. However, the column widths may not be based on Figure 3 The skip information 345 is the only factor that determines how much data should be skipped.
[0059] Figure 5 Showing the embodiment according to the disclosure Figure 3How can the data in the database 310 be aligned? Figure 5 , columns 410-4 to 410-8 are shown. Columns 410-4 to 410-7 may be fixed width columns: Figure 5 , each of columns 410-4 through 410-7 is shown as being two bytes wide. However Figure 3 The database 310 can be designed so that each column should start at a multiple of four bytes: that is, the data should be aligned on four-byte boundaries. Figure 5 , this alignment is shown as alignment 505.
[0060] Since each column 410-4 to 410-7 is only two bytes wide, some columns 410 may start two bytes more than the start of the previous column 410. For example, although column 410-4 is shown as starting at byte 12, column 410-4 only stores two bytes of data. Since in the example shown, columns 410 are aligned to four-byte boundaries, column 410-5 will start at byte 16 (the nearest four-byte boundary of column 410-4 that allows storage of all data in column 410-4), rather than starting at byte 14 (the start byte of column 410-4 plus the width of column 410-4). For example, if column 410-4 is actually six bytes wide, column 410-5 will start at byte 20 (leaving at least six bytes for the next four-byte boundary of column 410-4).
[0061] Therefore, when calculating the data width 360, Figure 3 The skip circuit 330 of 410 may not only take into account the width of the data stored in the column 410, but also any additional space used for data alignment. In other words, the data width 360 may be equal to the sum of the widths of the columns 410-4 to 410-7 plus the additional space used to keep the columns 410-5 to 410-8 aligned. Figure 5 As can be seen in the example of , data width 360 is therefore 16 bytes: two bytes for the width of each column 410-4 to 410-7, plus two bytes for the alignment of each column 410-5 to 410-8. In other examples, data width 360 may be different based on the number of columns 410, the width of the columns 410, and the additional space for data alignment.
[0062] review Figure 4 Columns 410-2 and 410-3 are each variable width columns. Since each entry can specify how much data is actually stored in the variable width column, it can be concluded that Figure 4 Columns 410-2 and 410-3 may each store no more than four bytes of data, or column 410-4 may start with a four-byte alignment different than byte 12. Figure 5 Only one possible example alignment is shown, and Figure 3 Other entries in database 310 may have different column alignments.
[0063] In the above example, columns 410-4 to 410-7 are each described as two bytes wide. As mentioned above, this is for example purposes only, and each column 410-4 to 410-7 may have a different width that may be greater than the data alignment width. In addition, although Figure 5 Show Figure 3 The database 310 aligns data along four-byte boundaries, but any other alignment boundary (or data alignment width) may be used without restriction.
[0064] Figure 6 Showing the embodiment according to the disclosure Figure 1 The accelerator 135 generates Figure 3 A flowchart of an example process of skipping information 345. Figure 6 In block 605, Figure 3 The accelerator 135 may receive a Figure 3 Database 310 Figure 3 Query 315. At block 610, Figure 3 The skip circuit 330 can identify Figure 3 In the database 310 Figure 3 The query used in 315 Figure 4 Column 410. At block 615, Figure 3 The skip circuit 330 can identify Figure 3 The database 310 does not contain Figure 3 The query used in 315 Figure 4 Finally, at block 620, Figure 3 The skip circuit 330 may be based on Figure 3 The database 310 does not contain Figure 3 The query used in 315 Figure 4 Column 410, generated Figure 3 Skip information 345.
[0065] Figure 7 Showing the embodiment according to the disclosure Figure 1 The accelerator 135 generates and stores Figure 3 A flowchart of an example process of skipping information 345. Figure 7 In block 705, Figure 3 The skip circuit 330 can generate Figure 3 The beginning column is 350, Figure 3 The number of columns that will be skipped is 355 and Figure 3 The data width is 360. At block 710, Figure 3 The skip circuit 330 may then store Figure 3 The skip information 345 is stored in Figure 3 In the storage device 335, Figure 3 The column filter 340 can be obtained from Figure 3 Storage device 335 obtains Figure 3 Skip information 345.
[0066] Figure 8 Showing the embodiment according to the disclosure Figure 3 The skip circuit 330 establishes Figure 3 A flowchart of an example process of skipping information 345. Figure 8 In block 805, Figure 3 The skip circuit 330 can identify Figure 4 The group of invalid fixed-width columns 410. At block 810, Figure 3 The skip circuit 330 may store the first column in the group as Figure 3 For example, for Figure 4 The group consisting of columns 410-4 to 410-7, Figure 3 The beginning column 350 can be Figure 4 At block 815, Figure 3 The skip circuit 330 can store Figure 3 The number of columns to be skipped in a group of columns consisting of 355. For example, for Figure 4 The group consisting of columns 410-4 to 410-7 is composed of Figure 4 The group consisting of columns 410-4 to 410-7 exists Figure 4 The four columns 410, therefore Figure 3 The number 355 can be four.
[0067] At block 820, Figure 3 The skip circuit 330 can calculate the number of columns in the group to be skipped. Figure 4 For example, for the data width of column 410 Figure 4 The group consisting of columns 410-4 to 410-7 exists Figure 4 At block 825, four columns 410 are provided, each column 410 having a data width of two bytes, for a total of eight bytes. Figure 3 The skip circuit 330 can be calculated to represent Figure 3 The offset of the additional space used in the database 310 of to ensure that the columns are aligned. Figure 4 Columns 410-4 to 410-7 are grouped and use four-byte alignment, for Figure 4 For each of columns 410-4 through 410-7, the offset may be calculated as two bytes (to pad each individual column to a four-byte boundary), for a total of eight bytes. Finally, at block 830, Figure 3 The skip circuit 330 can be Figure 4 The sum of the data width of column 410 and the offset used in the group is stored as Figure 3 The data width is 360. For example, for Figure 4 The columns 410-4 to 410-7 are grouped and use four-byte alignment, with a total width of 16 bytes (eight bytes plus eight bytes).
[0068] Fig. 9 The use of the disclosed embodiment is shown Figure 3 Database 310 processing Figure 3 Query 315 hours Figure 3 The column filter 340 uses Figure 3 A flowchart of an example process of skipping information 345. Fig. 9 In block 605, Figure 3 The accelerator 135 may receive a Figure 3 Database 310 Figure 3 Query 315. (Note that due to receiving Figure 3 The operation of query 315 is the same operation, only different processing is caused according to the circuit, so in Figure 6 and Fig. 9 The same figure reference number 605 is shown in both. At block 905, Figure 3 The column filter 340 can be used Figure 3 Skip information 345 filtering Figure 3 More specifically, when receiving an entry from Figure 3 When the data in the database 310 is stored, the column filter 340 may identify Figure 4 What is the data in column 410? Figure 3 The skip information 345 will be skipped Figure 4 The data in column 410 may be "removed" (that is, not forwarded to Figure 3 At block 910, the query processing circuit 320 may be based at least in part on Figure 3 Query 315, filtered database and column filters, processing Figure 3 Query 315.
[0069] Fig.10 Showing the embodiment according to the disclosure Figure 3 Column filter 340 loaded Figure 3 A flowchart of an example process of skipping information 345. Fig.10 In block 1005, Figure 3 The column filter 340 can be obtained from Figure 3 The storage device 335 is loaded Figure 3 Skip information 345.
[0070] exist Figures 6 to 10 In the figure, some embodiments of the disclosure are shown. However, those skilled in the art will recognize that other embodiments of the disclosure are also possible by changing the order of the blocks, by omitting blocks, or by including links not shown in the figures. All these variations of the flow charts are considered to be embodiments of the disclosure, whether explicitly described or not.
[0071] Some disclosed embodiments may include an accelerator for generating skip information that can be used by a column filter to skip columns of data in a database in response to a query. By using the skip information to skip columns, the time involved in processing a query can be reduced, providing a technical advantage over other methods for processing queries.
[0072] Handling invalid fixed columns (e.g., invalid fixed-width columns) in some database system tables can have a significant impact on array processing time. Invalid columns are not used in scan or pick passes. Therefore, for wider and sparser valid columns, this problem can worsen and affect the processing time of each array, and this is repeated for all arrays in the input schema.
[0073] The disclosed embodiment includes a preprocessing algorithm that uses a list of valid column indices and the data type of each column to convert each group of consecutive invalid fixed columns into a column of a defined length. This preprocessing algorithm can speed up the performance of such a database system by reducing the time required to process each array in a column filter kernel.
[0074] In one example, column filtering can be processed column by column in each array (row) starting from column 0 to the most significant column. In some disclosed embodiments, column filtering can support up to 128 columns or more. The column filter can be implemented in hardware to filter invalid fixed columns using prompt messages.
[0075] Processing invalid fixed columns may waste 2 cycles per column, and in some cases 4 cycles.
[0076] Even with a relatively narrow array (only 16 columns), an invalid fixed column may waste about 16 cycles (in the best case) to process seven columns. Such waste can be repeated for all arrays.
[0077] The disclosed embodiment may pre-process the list of valid columns and invalid columns and each column quantity type, and may convert each group of fixed consecutive invalid columns into one column with a defined length.
[0078] After the control and status register (CSR) configuration is complete and during prefetching of input pages, the skip algorithm can be run. The skip algorithm can loop through all column indexes in the array and detect each group of invalid fixed consecutive columns. For each group of invalid fixed consecutive columns, the algorithm can generate a hint message for the column filter and store the hint message in the shared memory. The message contains the starting index of the group, how many columns can be skipped, and the length of the columns grouped together can depend on the data type and alignment requirements of each column. During array processing, the column filter can use the skip message to convert each group of invalid fixed consecutive columns into one column with a predefined length.
[0079] The following discussion is intended to provide a brief, general description of suitable one or more machines in which specific aspects of the disclosure may be implemented. One or more machines may be controlled at least in part by input from conventional input devices (such as keyboards, mice, etc.) and by instructions received from another machine, interaction with a virtual reality (VR) environment, biometric feedback, or other input signals. As used herein, the term "machine" is intended to broadly cover a single machine, a virtual machine, or a system of communicatively combined machines, virtual machines, or devices operating together. Exemplary machines include computing devices (such as personal computers, workstations, servers, portable computers, handheld devices, phones, tablets, etc.), and transportation devices (such as private vehicles or public transportation (e.g., cars, trains, taxis, etc.)).
[0080] One or more machines may include an embedded controller (such as a programmable logic device or logic array, or a non-programmable logic device or logic array, an application specific integrated circuit (ASIC), an embedded computer, a smart card, etc.). One or more machines may utilize one or more connections to one or more remote machines (such as through a network interface, a modem, or other communication combination). The machines may be interconnected through a physical network and / or a logical network (such as an intranet, the Internet, a local area network, a wide area network, etc.). Those skilled in the art will understand that network communications may utilize various wired and / or wireless short-range and / or long-range carriers and protocols (including radio frequency (RF), satellite, microwave, Institute of Electrical and Electronics Engineers (IEEE) 802.11, Bluetooth, optical, infrared, cable, laser, etc.).
[0081] Embodiments of the present disclosure may be described by reference to or in conjunction with associated data including functions, processes, data structures, applications, etc., which, when accessed by a machine, enable the machine to perform tasks or define abstract data types or low-level hardware contexts. The associated data may be stored in, for example, volatile memory and / or non-volatile memory (e.g., RAM, ROM, etc.), or in other storage devices including hard disk drives, floppy disks, optical storage, tapes, flash memory, memory sticks, digital video disks, bio-storage, etc. and their associated storage media. The associated data may be transmitted in a transmission environment including a physical and / or logical network in the form of packets, serial data, parallel data, propagation signals, etc., and may be used in a compressed format or an encrypted format. The associated data may be used in a distributed environment and stored locally and / or remotely for machine access.
[0082] The disclosed embodiments may include a tangible, non-transitory machine-readable medium containing instructions executable by one or more processors, including instructions for performing elements of the disclosure as described herein.
[0083] The various operations of the above methods may be performed by any suitable means capable of performing the operations (such as various hardware and / or software components, circuits and / or modules). Software may include an ordered list of executable instructions for implementing logical functions, and may be implemented in any "processor readable medium" for use by or in conjunction with an instruction execution system, device or apparatus (such as a single-core or multi-core processor, or a system containing a processor).
[0084] The blocks or steps of the methods or algorithms and functions described in conjunction with the embodiments disclosed herein may be implemented directly in hardware, in software modules executed by a processor, or in a combination of the two. If implemented in software, the functions may be stored on or transmitted via a tangible, non-transitory computer-readable medium. The software module may reside in a random access memory (RAM), flash memory, read-only memory (ROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), registers, a hard disk, a removable disk, a CD ROM, or any other form of storage medium known in the art.
[0085] Having described and illustrated the principles of the disclosure with reference to the illustrated embodiments, it will be appreciated that the illustrated embodiments may be modified in arrangement and detail and may be combined in any desired manner without departing from such principles. Also, although the foregoing discussion has focused on specific embodiments, other configurations are contemplated. Specifically, even when expressions such as "according to the disclosed embodiments" are used herein, these phrases are meant to refer generally to the feasibility of the embodiments, and are not intended to limit the disclosure to specific embodiment configurations. As used herein, these terms may refer to the same or different embodiments that may be combined into other embodiments.
[0086] The foregoing illustrative embodiments should not be construed as limiting the disclosure of the illustrative embodiments. Although some embodiments have been described, it will be readily appreciated by those skilled in the art that many modifications to those embodiments are feasible without substantially departing from the novel teachings and advantages of the present disclosure. Therefore, all such modifications are intended to be included within the scope of the disclosure as defined in the claims.
[0087] The disclosed embodiments may be extended to the following statements, but are not limited to: Statement 1. The disclosed embodiments include an accelerator, comprising: an interface to a first storage device, the first storage device being configured to store a database, the database comprising a first column, a second column, a third column, and a fourth column; a second storage device for storing first information about a first column of a database, second information about a second column of the database, third information about a third column of the database, and fourth information about a fourth column of the database; and The first circuit is configured to process the first information, the second information, the third information, the fourth information and the query to generate skip information.
[0088] Statement 2. A disclosed embodiment includes the accelerator of Statement 1, further comprising a second circuit for processing a query using the database and the skip information.
[0089] Statement 3. A disclosed embodiment includes the accelerator of Statement 2, wherein the second circuit includes a column filter for identifying a column in the database based at least in part on the skip information.
[0090] Statement 4. A disclosed embodiment includes the accelerator of Statement 1, further comprising a third storage device for storing skip information.
[0091] Statement 5. A disclosed embodiment includes the accelerator of Statement 1, wherein the second storage device is configured to store the first information, the second information, the third information, and the fourth information.
[0092] Statement 6. A disclosed embodiment includes an accelerator according to Statement 1, wherein: The query includes a first identifier of a first column as a select column of the query and a second identifier of a second column as a select column of the query; and The skip information includes the starting column, the number of columns to be skipped, and the data width.
[0093] Statement 7. A disclosed embodiment includes an accelerator according to Statement 6, wherein: The start column includes the third identifier of the third column; and The data width is generated based at least in part on the first width of the third column and the second width of the fourth column.
[0094] Statement 8. A disclosed embodiment includes the accelerator of Statement 7, wherein the data width is generated based at least in part on the first width of the third column, the second width of the fourth column, and the data alignment width of the database.
[0095] Statement 9. A disclosed embodiment includes the accelerator of Statement 1, wherein the first circuit is configured to generate the skip information based at least in part on the third column and the fourth column being fixed width columns.
[0096] Statement 10. A disclosed embodiment includes the accelerator of Statement 1, wherein the accelerator includes a first storage device.
[0097] Statement 10a. A disclosed embodiment includes the accelerator of Statement 1, wherein the first information includes a flag indicating whether the first column is fixed width or variable width, or a flag indicating a width of the first column.
[0098] Statement 10c. A disclosed embodiment includes the accelerator of Statement 1, wherein the second storage device stores a data alignment width of the database.
[0099] Statement 11. The disclosed embodiments include an accelerator, comprising: a column filter for skipping at least one column in the database based at least in part on the skip information; and Circuitry is provided for processing a query based at least in part on the query, the database, and the column filters.
[0100] Statement 12. A disclosed embodiment includes an accelerator according to Statement 11, wherein: The skip information includes the starting column and the number of columns to be skipped; and The at least one column is identified based at least in part on a starting column and a number of columns to be skipped.
[0101] Statement 13. A disclosed embodiment includes the accelerator of Statement 12, wherein the skip information is based at least in part on a starting column and a number of columns that are fixed width columns.
[0102] Statement 14. A disclosed embodiment includes an accelerator according to Statement 11, wherein: Skip information includes the start column and data width; and The at least one column is identified based at least in part on a starting column and a data width.
[0103] Statement 15. The disclosed embodiments include a method for database acceleration, comprising: receiving, at the accelerator, a query from the database; identifying a first column of a database and a second column of a database based at least in part on the query; identifying a third column of the database and a fourth column of the database based at least in part on the first column and the second column; and The skip information is generated by the accelerator based at least in part on the third column and the fourth column.
[0104] Statement 16. A disclosed embodiment comprises the method of Statement 15, further comprising: processing the query based at least in part on the database and the skip information.
[0105] Statement 17. A disclosed embodiment includes the method according to statement 16, wherein: Generating, by the accelerator, skip information based at least in part on the third column and the fourth column includes: storing the skip information in a storage device of the accelerator; and Processing the query based at least in part on the database and the skip information includes loading the skip information from a storage device of the accelerator.
[0106] Statement 18. A disclosed embodiment comprises a method according to Statement 15, wherein the step of identifying a first column of the database and a second column of the database based at least in part on the query comprises: Identify the first column as a select column for the query; and Identifies the second column as the select column for the query.
[0107] Statement 19. The disclosed embodiments include a method according to Statement 15, wherein the step of identifying a third column of the database and a fourth column of the database based at least in part on the first column and the second column includes: identifying the third column of the database and the fourth column of the database based at least in part on the query being independent of the third column and the fourth column.
[0108] Statement 20. A disclosed embodiment includes the method of Statement 15, wherein generating skip information by an accelerator based at least in part on the third column and the fourth column comprises generating skip information by circuitry of the accelerator based at least in part on the third column and the fourth column.
[0109] Statement 21. A disclosed embodiment includes a method according to statement 15, wherein the step of generating skip information by an accelerator based at least in part on the third column and the fourth column includes: generating a start column, a number of columns to be skipped, and a data width based at least in part on the third column and the fourth column.
[0110] Statement 22. A disclosed embodiment comprises a method according to Statement 21, wherein the step of generating a start column, a number of columns to be skipped, and a data width based at least in part on the third column and the fourth column comprises: identifying the third column as the start column; and The data width is generated based at least in part on the first width of the third column and the second width of the fourth column.
[0111] Statement 23. The disclosed embodiment includes a method according to Statement 22, wherein the step of generating the data width based at least in part on the first width of the third column and the second width of the fourth column includes: generating the data width based at least in part on the first width of the third column, the second width of the fourth column and the data alignment width of the database.
[0112] Statement 24. The disclosed embodiments include a method for database acceleration, comprising: receiving, at the accelerator, a query from the database; filtering columns in a database using a column filter based at least in part on the skip information; and The query is processed based at least in part on the query, database, and column filters.
[0113] Statement 25. A disclosed embodiment includes the method of Statement 24, wherein filtering the columns in the database using a column filter based at least in part on the skip information includes: loading the skip information from a storage device.
[0114] Statement 26. A disclosed embodiment includes the method of Statement 25, wherein the step of loading the skip information from the storage device comprises: loading the skip information from the storage device of the accelerator.
[0115] Statement 27. A disclosed embodiment comprises a method according to Statement 24, wherein: The skip information includes the starting column and the number of columns to be skipped; and The step of filtering the columns in the database using a column filter based at least in part on the skip information includes filtering the columns in the database using a column filter based at least in part on a starting column and a number of columns to be skipped.
[0116] Statement 28. A disclosed embodiment comprises the method of Statement 27, wherein the skip information is based at least in part on a starting column and a number of columns that are fixed width columns.
[0117] Statement 29. A disclosed embodiment comprises a method according to Statement 24, wherein: The skip information includes the start column and data width; and The step of filtering the columns in the database using the column filter based at least in part on the skip information includes filtering the columns in the database using the column filter based at least in part on the start column and the data width.
[0118] Statement 30. The disclosed embodiments include an article comprising a non-transitory storage medium having stored thereon instructions that, when executed by a machine, cause: receiving, at the accelerator, a query from the database; identifying a first column of a database and a second column of a database based at least in part on the query; identifying a third column of the database and a fourth column of the database based at least in part on the first column and the second column; and The skip information is generated by the accelerator based at least in part on the third column and the fourth column.
[0119] Statement 31. A disclosed embodiment comprises the article of statement 30, a non-transitory storage medium further having stored thereon instructions that, when executed by a machine, cause processing of a query based at least in part on the database and the skip information.
[0120] Statement 32. A disclosed embodiment comprises an article according to statement 31, wherein: The process of generating skip information by the accelerator based at least in part on the third column and the fourth column includes: storing the skip information in a storage device of the accelerator; and Processing the query based at least in part on the database and the skip information includes loading the skip information from a storage device of the accelerator.
[0121] Statement 33. A disclosed embodiment comprises an article according to statement 30, wherein the process of identifying the first column of the database and the second column of the database based at least in part on the query comprises: Identify the first column as a select column for the query; and Identifies the second column as the select column for the query.
[0122] Statement 34. The disclosed embodiments include an article according to statement 30, wherein the processing of identifying a third column of the database and a fourth column of the database based at least in part on the first column and the second column includes: identifying the third column of the database and the fourth column of the database based at least in part on the query being independent of the third column and the fourth column.
[0123] Statement 35. A disclosed embodiment includes the article of statement 30, wherein the processing of generating skip information by the accelerator based at least in part on the third column and the fourth column comprises: generating the skip information by circuitry of the accelerator based at least in part on the third column and the fourth column.
[0124] Statement 36. A disclosed embodiment comprises an article according to statement 30, wherein the processing of generating skip information by the accelerator based at least in part on the third column and the fourth column comprises: generating a start column, a number of columns to be skipped, and a data width based at least in part on the third column and the fourth column.
[0125] Statement 37. A disclosed embodiment comprises the article according to statement 36, wherein the process of generating a start column, a number of columns to be skipped, and a data width based at least in part on the third column and the fourth column comprises: identifying the third column as the start column; and The data width is generated based at least in part on the first width of the third column and the second width of the fourth column.
[0126] Statement 38. The disclosed embodiments include an article according to Statement 37, wherein the processing of generating a data width based at least in part on a first width of the third column and a second width of the fourth column includes: generating the data width based at least in part on the first width of the third column, the second width of the fourth column, and a data alignment width of a database.
[0127] Statement 39. The disclosed embodiments include an article comprising a non-transitory storage medium having stored thereon instructions that, when executed by a machine, cause: receiving, at the accelerator, a query from the database; filtering columns in a database using a column filter based at least in part on the skip information; and The query is processed based at least in part on the query, database, and column filters.
[0128] Statement 40. A disclosed embodiment comprises the article of statement 39, wherein the processing of filtering a column in a database using a column filter based at least in part on skip information comprises: loading the skip information from a storage device.
[0129] Statement 41. A disclosed embodiment includes the article of statement 40, wherein the process of loading the skip information from the storage device comprises: loading the skip information from the storage device of the accelerator.
[0130] Statement 42. A disclosed embodiment comprises an article according to statement 39, wherein: The skip information includes the starting column and the number of columns to be skipped; and The process of filtering the columns in the database using the column filter based at least in part on the skip information includes filtering the columns in the database using the column filter based at least in part on the starting column and the number of columns to be skipped.
[0131] Statement 43. A disclosed embodiment comprises the article of statement 42, wherein the skip information is based at least in part on the starting column and the number of columns that are fixed width columns.
[0132] Statement 44. A disclosed embodiment comprises an article according to statement 39, wherein: The skip information includes the start column and data width; and The process of filtering the columns in the database using the column filter based at least in part on the skip information includes filtering the columns in the database using the column filter based at least in part on the start column and the data width.
[0133] Therefore, in view of the various arrangements of the embodiments described herein, this detailed description and the accompanying materials are intended to be illustrative only and should not be taken as limiting the scope of the disclosure. Therefore, what is claimed as disclosed is all such modifications that may fall within the scope and spirit of the appended claims and their equivalents.
Claims
1. An accelerator, comprising: an interface to a first storage device, the first storage device being used to store a database, the database comprising a first column, a second column, a third column, and a fourth column; a second storage device, for storing first information about a first column of a database, second information about a second column of the database, third information about a third column of the database, and fourth information about a fourth column of the database; as well as The first circuit is configured to process the first information, the second information, the third information, the fourth information, and the query to generate skip information.
2. The accelerator according to claim 1, further comprising: A second circuit is configured to process the query using the database and the skip information.
3. The accelerator according to claim 2, wherein: The second circuit includes a column filter for identifying a column in the database based at least in part on the skip information.
4. The accelerator according to claim 1, wherein: The query includes a first identifier of a first column as a select column of the query and a second identifier of a second column as a select column of the query; and The skip information includes the starting column, the number of columns to be skipped, and the data width.
5. The accelerator according to claim 4, wherein: The start column includes the third identifier of the third column; and The data width is generated based at least in part on the first width of the third column and the second width of the fourth column.
6. The accelerator according to claim 5, wherein: The data width is generated based at least in part on the first width of the third column, the second width of the fourth column, and a data alignment width of the database.
7. The accelerator according to claim 1, wherein: The first circuit is configured to generate skip information based at least in part on the third column and the fourth column being fixed width columns.
8. The accelerator according to claim 1, wherein: The first information includes a flag indicating whether the first column is of fixed width or variable width, or a flag indicating the width of the first column.
9. A method for accelerating a database, comprising: receiving, at the accelerator, a query from the database; identifying a first column of a database and a second column of a database based at least in part on the query; identifying a third column of the database and a fourth column of the database based at least in part on the first column and the second column; and The skip information is generated by the accelerator based at least in part on the third column and the fourth column.
10. The method according to claim 9, further comprising: The query is processed based at least in part on the database and the skip information.
11. The method according to claim 9, wherein: The step of identifying a first column of a database and a second column of a database based at least in part on the query comprises: identifying the first column as a select column for the query; and A second column is identified as a select column for the query.
12. The method according to claim 9, wherein: Generating skip information by the accelerator based at least in part on the third column and the fourth column includes generating the skip information by circuitry of the accelerator based at least in part on the third column and the fourth column.
13. The method according to claim 9, wherein: Generating skip information by the accelerator based at least in part on the third column and the fourth column includes generating a start column, a number of columns to be skipped, and a data width based at least in part on the third column and the fourth column.
14. The method according to claim 13, wherein: The step of generating a start column, a number of columns to be skipped, and a data width based at least in part on the third column and the fourth column comprises: identifying the third column as the start column; and The data width is generated based at least in part on the first width of the third column and the second width of the fourth column.
15. The method according to claim 14, wherein: Generating the data width based at least in part on the first width of the third column and the second width of the fourth column includes generating the data width based at least in part on the first width of the third column, the second width of the fourth column, and a data alignment width of a database.
16. A method for accelerating a database, comprising: receiving, at the accelerator, a query from the database; filtering columns in a database using a column filter based at least in part on the skip information; as well as The query is processed based at least in part on the query, the database, and the column filters.
17. The method according to claim 16, wherein: Filtering the columns in the database using a column filter based at least in part on the skip information includes loading the skip information from a storage device.
18. The method according to claim 16, wherein: The skip information includes the starting column and the number of columns to be skipped; and The step of filtering the columns in the database using a column filter based at least in part on the skip information includes filtering the columns in the database using a column filter based at least in part on a starting column and a number of columns to be skipped.
19. The method according to claim 18, wherein: The skip information is based at least in part on the starting column and the number of columns that are fixed width columns.
20. The method according to claim 16, wherein: The skip information includes the start column and data width; and The step of filtering the columns in the database using the column filter based at least in part on the skip information includes filtering the columns in the database using the column filter based at least in part on the start column and the data width.