Read-Only CySQL: Method for High-Speed Execution of Complex Queries Relating to Fixed Data for Games
In an online game that is provided on a long-term basis, the amount of data used in the game, such as the attributes of items and cards, becomes huge. Although this data is static data that does not change in the game, it is necessary for the game system to search for and use necessary items from this data as the game proceeds. Since this search processing is repeatedly executed during the execution of the game, the search processing considerably affects the responsiveness of the game as a whole. In particular, in the case of a game that operates on a Web browser, with which it is difficult to install data in advance on the client side, a critical issue is enhancing the speed of searching static data in the game. Thus, according to this invention, queries constituting minimum units (sub-queries) that can be entered from a game are exhaustively executed in advance, and search processing is executed by combining the results of the queries constituting minimum units by using set operations at the time of execution. A technical novelty of this invention consists in that, with pre-link processing in which the sub-queries are executed statically and conditions serving as keys for identifying the individual sub-queries are statically associated with the search results for the individual sub-queries, it is possible to uniquely identify a search result when a query has been edited. That is, when conditions for a query have been entered, it is possible to obtain the results of sub-queries constituting the query without performing any repetitive processing. Furthermore, when a query has been designated via a UI, it is possible to obtain the final search result just by calculating the union (OR conditions), the intersection (AND conditions), and/or the difference (NOT conditions) among the sets of the results of sub-queries associated with the UI. The number of set operations can be minimized by executing set operations in order starting with a sub-query having the highest ability to narrow down possible results. Accordingly, it becomes possible to execute a query, however complex it is, at an extremely high speed.
Full Text: Google Patents