发明名称 Database processing method, database processing system and database server
摘要 It is provided a database processing method including: a first step of receiving a query request instructing to output the requested data as query results in a designated order; a second step of generating a query execution plan including an order of accessing tables for storing the data based on the received query request; a third step of acquiring the data requested based on the query request from the database based on the generated query execution plan; a fourth step of generating intermediate results including the acquired data; a fifth step of sorting the generated intermediate results in the designated order; a sixth step of judging, for each of the intermediate results, whether an order of the sorted intermediate results has been determined; and a seventh step of outputting the intermediate results whose order has been determined as the query results in order from a head thereof.
申请公布号 US9348866(B2) 申请公布日期 2016.05.24
申请号 US201113814976 申请日期 2011.01.31
申请人 Hitachi, Ltd. 发明人 Tanaka Michiko;Ushijima Kazutomo;Shimizu Akira;Tokuda Seisuke;Kawamura Nobuo
分类号 G06F17/30 主分类号 G06F17/30
代理机构 Mattingly & Malur, PC 代理人 Mattingly & Malur, PC
主权项 1. A database processing method for outputting requested data on a computer which executes a database management system for managing a database storing data in a plurality of tables containing a plurality of records each including one or more columns, the computer including a processor executing the database management system and a memory storing the database management system, the database processing method comprising: a first step of receiving a query request instructing to sort requested data based on values of a sort-designated column of the requested data and output the requested data as query results in a designated order; a second step of generating a query execution plan including an order of accessing the tables of the database storing the requested data based on the received query request; a third step of acquiring data from the database based on the generated query execution plan; a fourth step of generating intermediate results including the acquired data in units of the records; a fifth step of sorting the generated intermediate results in the designated order based on the values of the sort-designated column; a sixth step of judging, for each of the intermediate results, whether an order of the sorted intermediate results, in which the sort-designated column has been acquired, has been determined; and a seventh step of outputting the intermediate results whose order has been determined as the query results in the designated order, wherein: in the third step, the data is acquired for each of the one or more columns, in the fourth step, the intermediate results are generated in units of the records each including one or more columns, in the sixth step, it is judged that the designated order has not been determined in a case where at least part of the data corresponding to the one or more columns that compose each of the records has not been acquired, the records of one of the tables includes the sort-designated column storing the values for determining the designated order of the query results, the fourth step includes an eighth step of classifying the intermediate results generated into any one of a first list including the intermediate results whose value of the sort-designated column has not been acquired, a second list including the intermediate results whose value of the sort-designated column has been acquired and for which at least part of the data corresponding to the one or more columns that compose the record has not been acquired, and a third list including the intermediate results for which all the data corresponding to the one or more columns that compose the record has been acquired, in the fifth step, the intermediate results included in the third list are sorted in the designated order, the sixth step includes a ninth step of judging whether there is an intermediate result classified into the first list, and a tenth step of acquiring, as an order determination judgment value, the value of the sort-designated column of the intermediate result that is first in order when the intermediate results classified into the second list are sorted in the designated order, in the sixth step, it is judged that the order has been determined for the intermediate result which has been classified into the third list and which has the value of the sort-designated column that precedes the intermediate result having the order determination judgment value in a case where there is no intermediate result classified into the first list, and in the seventh step, the intermediate results which have been classified into the third list and for which the order has been determined are outputted as the query results in the designated order.
地址 Tokyo JP