US 12,271,383 B2
Method and apparatus for executing structural query language instruction in solid-state storage device
Bo-Cheng Lai, Kaohsiung (TW); and Yen-Shi Kuo, Taoyuan (TW)
Assigned to SILICON MOTION, INC., Zhubei (TW)
Filed by Silicon Motion, Inc., Zhubei (TW)
Filed on Oct. 27, 2023, as Appl. No. 18/384,515.
Claims priority of provisional application 63/422,053, filed on Nov. 3, 2022.
Claims priority of application No. 202310630567.6 (CN), filed on May 31, 2023.
Prior Publication US 2024/0152516 A1, May 9, 2024
Int. Cl. G06F 16/2455 (2019.01); G06F 12/02 (2006.01); G06F 16/22 (2019.01)
CPC G06F 16/2455 (2019.01) [G06F 12/0253 (2013.01); G06F 16/2282 (2019.01)] 20 Claims
OG exemplary drawing
 
1. A method for executing Structural Query Language (SQL) instructions in a Solid-state Storage Device (SSD), performed within a flash controller coupled to a host side through a host interface (I/F) thereof, and a flash module through a flash I/F thereof, comprising:
obtaining an SQL query from a host side through a host I/F;
parsing the SQL query according an SQL syntax tree to generate a series of table tasks to execute;
reading a first table from the flash module and selecting a plurality of first records satisfying a first filtering condition from the first table to generate a first intermediate table;
reading a second table from the flash module and selecting a plurality of second records satisfying a second filtering condition from the second table to generate a second intermediate table;
splitting the second intermediate table into a plurality of second intermediate sub-tables on average;
merging each first record comprising a specific value in the first intermediate table into each second record comprising the specific value in the plurality of second intermediate sub-tables parallelly to generate a third intermediate table;
performing an arithmetic computation, a logical computation or both on a specific field in the third intermediate table to generate a calculation result, and storing the calculation result in a final dataset; and
replying to the host side with the final dataset through the host I/F.