| CPC G06F 16/2455 (2019.01) [G06F 12/0253 (2013.01); G06F 16/2282 (2019.01)] | 20 Claims |

|
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.
|