US 7698312 B2 Resumen A method and apparatus for performing recursive database operations is provided. According to one aspect, a plurality of first-stage slaves and a plurality of second-stage slaves are established in a database server. During one or more iterations of a recursive database operation, the first-stage slaves concurrently process data items stored in a data repository and send results to the second-stage slaves. The second-stage slaves receive the results and concurrently process those results. The second-stage slaves store the results of the second-stage slaves' processing in the data repository. Subsequent iterations of the recursive database operation proceed in this manner until the recursive database operation has been completed. In each iteration, the first-stage slaves consume the product of the second-stage slaves' previous iteration's processing, and the second-stage slaves consume the product of the first-stage slaves' current iteration's processing.
Reclamaciones(28) 1. A method comprising:
during a first iteration of a multi-iteration operation performed by a first set of slaves and a second set of slaves, generating results of operations performed by the second set of slaves;
during each iteration of two or more iterations of the multi-iteration operation, the two or more iterations occurring after the first iteration of the multi-iteration operation, (a) providing, to the first set of slaves, results of operations performed by the second set of slaves during a previous iteration of the multi-iteration operation, and (b) providing, to the second set of slaves, results of operations performed by the first set of slaves during the current iteration of the multi-iteration operation;
wherein the operations performed by the first set of slaves are first operations for counting occurrences of itemsets in each of a plurality of data subsets;
wherein the operations performed by the second set of slaves are second operations for identifying which of said itemsets occur above a threshold frequency within the plurality of data subsets;
wherein each slave in the second set of slaves performs the second operations for a different subset of said itemsets;
wherein each slave in the first set of slaves and the second set of slaves is a process or thread executed by one or more processors in a database system;
wherein each iteration of the multi-iteration operation is performed by one or more computing devices.
2. The method of
the first set of slaves executes concurrently with the second set of slaves;
at least some of the operations performed by the first set of slaves are performed during a same time that at least some of the operations performed by the second set of slaves are performed;
during each particular iteration of the two or more iterations:
(a) operations performed by the second set of slaves during said particular iteration are operations that the second set of slaves performs on results of operations performed by the first set of slaves during the particular iteration; and
(b) operations performed by the first set of slaves during said particular iteration are operations that the first set of slaves performs on results of operations performed by the second set of slaves during said iteration previous to said particular iteration.
3. The method of
4. The method of
during a first iteration of the multi-iteration operation, determining candidate N-element sets based on (N−1)-element sets stored in a data repository.
5. The method of
determining possible N-element sets that are subsets of an M-element set; and
for each particular possible N-element set of the possible N-element sets, performing steps comprising:
determining whether all (N−1)-element subsets of the particular possible N-element set are stored in the data repository; and
including the particular possible N-element set in the candidate N-element sets only if all (N−1)-element subsets of the particular possible N-element set are stored in the data repository.
6. The method of
assigning a first subset of a set of data structures to a first first-stage slave of the first set of slaves, wherein each data structure in the set of data structures comprises a separate set of elements;
assigning a second subset of the set of data structures to a second first-stage slave of the first set of slaves;
causing the first first-stage slave to perform first steps; and
causing the second first-stage slave to perform second steps;
wherein the first steps comprise determining, for each particular candidate N-element set of the candidate N-element sets, how many data structures in the first subset contain all of the elements of the particular candidate N-element set; and
wherein the second steps comprise determining, for each particular candidate N-element set of the candidate N-element sets, how many data structures in the second subset contain all of the elements of the particular candidate N-element set;
wherein the first steps and the second steps are performed concurrently.
7. The method of
for each particular candidate N-element set of the candidate N-element sets, determining a separate hash value that corresponds to the particular candidate N-element set; and
for each particular candidate N-element set of the candidate N-element sets, (a) selecting, from among the second set of slaves, a second-stage slave that corresponds to the separate hash value that corresponds to the particular candidate N-element set, and (b) sending, to said second-stage slave, separate count information that includes an indication of how many data structures in the first subset contain all of the elements of the particular candidate N-element set.
8. The method of
causing a first second-stage slave of the second set of slaves to perform first steps; and
causing a second second-stage slave of the second set of slaves to perform second steps;
wherein the first steps and the second steps are performed concurrently;
wherein the first steps comprise:
receiving, from a first first-stage slave of the first set of slaves, first count information for a first candidate N-element set of the candidate N-element sets;
receiving, from a second first-stage slave of the first set of slaves, second count information for the first candidate N-element set, wherein the second first-stage slave is separate from the first first-stage slave;
determining a first sum of at least the first count information for the first candidate N-element set and the second count information for the first candidate N-element set;
determining whether the first sum satisfies a specified threshold; and
including the first candidate N-element set in the second processed data items only if the first sum satisfies the specified threshold; and
wherein the second steps comprise:
receiving, from the first first-stage slave, first count information for a second candidate N-element set of the candidate N-element sets, wherein the second candidate N-element set differs from the first candidate N-element set;
receiving, from the second first-stage slave, second count information for the second candidate N-element set;
determining a second sum of at least the first count information for the second candidate N-element set and the second count information for the second candidate N-element set;
determining whether the second sum satisfies the specified threshold; and
including the second candidate N-element set in the second processed data items only if the second sum satisfies the specified threshold.
9. The method of
during a second iteration of the multi-iteration operation, determining candidate (N+1)-element sets based at least in part on N-element sets stored in the data repository.
10. The method of
determining possible (N+1)-element sets that are subsets of the M-element set; and
for each particular possible (N+1)-element set of the possible (N+1)-element sets, performing steps comprising:
determining whether all N-element subsets of the particular possible (N+1)-element set are stored in the data repository; and
including the particular possible (N+1)-element set in the candidate (N+1)-element sets only if all N-element subsets of the particular possible (N+1)-element set are stored in the data repository.
11. The method of
causing the first first-stage slave to perform third steps; and
causing the second first-stage slave to perform fourth steps;
wherein the third steps and the fourth steps are performed concurrently;
wherein the third steps comprise determining, for each particular candidate (N+1)-element set of the candidate (N+1)-element sets, how many data structures in the first subset contain all of the elements of the particular candidate (N+1)-element set; and
wherein the fourth steps comprise determining, for each particular candidate (N+1)-element set of the candidate (N+1)-element sets, how many data structures in the second subset contain all of the elements of the particular candidate (N+1)-element set.
12. The method of
causing the first second-stage slave to perform third steps; and
causing the second second-stage slave to perform fourth steps;
wherein the third steps and the fourth steps are performed concurrently;
wherein the third steps comprise:
receiving, from the first first-stage slave, first count information for a first candidate (N+1)-element set of the candidate (N+1)-element sets;
receiving, from the second first-stage slave, second count information for the first candidate (N+1)-element set;
determining a third sum of at least the first count information for the first candidate (N+1)-element set and the second count information for the first candidate (N+1)-element set;
determining whether the third sum satisfies the specified threshold; and
including the first candidate (N+1)-element set in the fourth processed data items only if the third sum satisfies the specified threshold; and
wherein the fourth steps comprise:
receiving, from the first first-stage slave, first count information for a second candidate (N+1)-element set of the candidate (N+1)-element sets, wherein the second candidate (N+1)-element set differs from the first candidate (N+1)-element set;
receiving, from the second first-stage slave, second count information for the second candidate (N+1)-element set;
determining a fourth sum of at least the first count information for the second candidate (N+1)-element set and the second count information for the second candidate (N+1)-element set;
determining whether the fourth sum satisfies the specified threshold; and
including the second candidate (N+1)-element set in the fourth processed data items only if the fourth sum satisfies the specified threshold.
13. One or more computer-readable storage media storing one or more sequences of instructions which, when executed by one or more processors, causes:
during a first iteration of a multi-iteration operation, generating results of operations performed by a second set of slaves;
during each iteration of two or more iterations of the multi-iteration operation, the two or more iterations occurring after the first iteration of the multi-iteration operation, (a) providing, to a first set of slaves, results of operations performed by a second set of slaves during a previous iteration of the multi-iteration operation, and (b) providing, to the second set of slaves, results of operations performed by the first set of slaves during the current iteration of the multi-iteration operation;
wherein the operations performed by the first set of slaves include first operations for counting occurrences of itemsets in each of a plurality of data subsets:
wherein the operations performed by the second set of slaves include second operations for identifying which of said itemsets occur above a threshold frequency within the plurality of data subsets;
wherein each slave in the second set of slaves performs the second operations for a different subset of said itemsets;
wherein each slave in the first set of slaves and the second set of slaves is a process or thread executed by one or more processors in a database system.
14. The one or more computer-readable storage media of
the first set of slaves executes concurrently with the second set of slaves;
at least some of the operations performed by the first set of slaves are performed during a same time that at least some of the operations performed by the second set of slaves are performed;
during each particular iteration of the two or more iterations;
(a) operations performed by the second set of slaves during said particular iteration are operations that the second set of slaves performs on results of operations performed by the first set of slaves during the particular iteration; and
(b) operations performed by the first set of slaves during said particular iteration are operations that the first set of slaves performs on results of operations performed by the second set of slaves during said iteration previous to said particular iteration.
15. The one or more computer-readable storage media of
16. The one or more computer-readable storage media of
during a first iteration of the multi-iteration operation, determining candidate N-element sets based on (N−1)-element sets stored in a data repository.
17. The one or more computer-readable storage media of
determining possible N-element sets that are subsets of an M-element set; and
for each particular possible N-element set of the possible N-element sets, performing steps comprising:
determining whether all (N−1)-element subsets of the particular possible N-element set are stored in the data repository; and
including the particular possible N-element set in the candidate N-element sets only if all (N−1)-element subsets of the particular possible N-element set are stored in the data repository.
18. The one or more computer-readable storage media of
assigning a first subset of a set of data structures to a first first-stage slave of the first set of slaves, wherein each data structure in the set of data structures comprises a separate set of elements;
assigning a second subset of the set of data structures to a second first-stage slave of the first set of slaves;
causing the first first-stage slave to perform first steps; and
causing the second first-stage slave to perform second steps;
wherein the first steps comprise determining, for each particular candidate N-element set of the candidate N-element sets, how many data structures in the first subset contain all of the elements of the particular candidate N-element set; and
wherein the second steps comprise determining, for each particular candidate N-element set of the candidate N-element sets, how many data structures in the second subset contain all of the elements of the particular candidate N-element set;
wherein the first steps and the second steps are performed concurrently.
19. The one or more computer-readable storage media of
for each particular candidate N-element set of the candidate N-element sets, determining a separate hash value that corresponds to the particular candidate N-element set; and
for each particular candidate N-element set of the candidate N-element sets, (a) selecting, from among the second set of slaves, a second-stage slave that corresponds to the separate hash value that corresponds to the particular candidate N-element set, and (b) sending, to said second-stage slave, separate count information that includes an indication of how many data structures in the first subset contain all of the elements of the particular candidate N-element set.
20. The one or more computer-readable storage media of
causing a first second-stage slave of the second set of slaves to perform first steps; and
causing a second second-stage slave of the second set of slaves to perform second steps;
wherein the first steps and the second steps are performed concurrently;
wherein the first steps comprise:
receiving, from a first first-stage slave of the first set of slaves, first count information for a first candidate N-element set of the candidate N-element sets;
receiving, from a second first-stage slave of the first set of slaves, second count information for the first candidate N-element set, wherein the second first-stage slave is separate from the first first-stage slave;
determining a first sum of at least the first count information for the first candidate N-element set and the second count information for the first candidate N-element set;
determining whether the first sum satisfies a specified threshold; and
including the first candidate N-element set in the second processed data items only if the first sum satisfies the specified threshold; and
wherein the second steps comprise:
receiving, from the first first-stage slave, first count information for a second candidate N-element set of the candidate N-element sets, wherein the second candidate N-element set differs from the first candidate N-element set;
receiving, from the second first-stage slave, second count information for the second candidate N-element set;
determining a second sum of at least the first count information for the second candidate N-element set and the second count information for the second candidate N-element set;
determining whether the second sum satisfies the specified threshold; and
including the second candidate N-element set in the second processed data items only if the second sum satisfies the specified threshold.
21. The one or more computer-readable storage media of
during a second iteration of the multi-iteration operation, determining candidate (N+1)-element sets based at least in part on N-element sets stored in the data repository.
22. The one or more computer-readable storage media of
determining possible (N+1)-element sets that are subsets of the M-element set; and
for each particular possible (N+1)-element set of the possible (N+1)-element sets, performing steps comprising:
determining whether all N-element subsets of the particular possible (N+1)-element set are stored in the data repository; and
including the particular possible (N+1)-element set in the candidate (N+1)-element sets only if all N-element subsets of the particular possible (N+1)-element set are stored in the data repository.
23. The one or more computer-readable storage media of
causing the first first-stage slave to perform third steps; and
causing the second first-stage slave to perform fourth steps;
wherein the third steps and the fourth steps are performed concurrently;
wherein the third steps comprise determining, for each particular candidate (N+1)-element set of the candidate (N+1)-element sets, how many data structures in the first subset contain all of the elements of the particular candidate (N+1)-element set; and
wherein the fourth steps comprise determining, for each particular candidate (N+1)-element set of the candidate (N+1)-element sets, how many data structures in the second subset contain all of the elements of the particular candidate (N+1)-element set.
24. The one or more computer-readable storage media of
causing the first second-stage slave to perform third steps; and
causing the second second-stage slave to perform fourth steps;
wherein the third steps and the fourth steps are performed concurrently;
wherein the third steps comprise:
receiving, from the first first-stage slave, first count information for a first candidate (N+1)-element set of the candidate (N+1)-element sets;
receiving, from the second first-stage slave, second count information for the first candidate (N+1)-element set;
determining a third sum of at least the first count information for the first candidate (N+1)-element set and the second count information for the first candidate (N+1)-element set;
determining whether the third sum satisfies the specified threshold; and
including the first candidate (N+1)-element set in the fourth processed data items only if the third sum satisfies the specified threshold; and
wherein the fourth steps comprise:
receiving, from the first first-stage slave, first count information for a second candidate (N+1)-element set of the candidate (N+1)-element sets, wherein the second candidate (N+1)-element set differs from the first candidate (N+1)-element set;
receiving, from the second first-stage slave, second count information for the second candidate (N+1)-element set;
determining a fourth sum of at least the first count information for the second candidate (N+1)-element set and the second count information for the second candidate (N+1)-element set;
determining whether the fourth sum satisfies the specified threshold; and
including the second candidate (N+1)-element set in the fourth processed data items only if the fourth sum satisfies the specified threshold.
25. A database system comprising:
one or more processors;
a database;
a first set of slaves and a second set of slaves executing on the one or more processors,
wherein the first set of slaves is different than the second set of slaves;
wherein the one or more processors are configured to:
during a first iteration of a multi-iteration operation performed by the first set of slaves and the second set of slaves, generate results of operations performed by the second set of slaves;
during each iteration of two or more iterations of the multi-iteration operation, the two or more iterations occurring after the first iteration of the multi-iteration operation, (a) provide, to the first set of slaves, results of operations performed by the second set of slaves during a previous iteration of the multi-iteration operation, and (b) provide, to the second set of slaves, results of operations performed by the first set of slaves during the current iteration of the multi-iteration operation;
wherein the operations performed by the first set of slaves are first operations for counting occurrences of itemsets in each of a plurality of data subsets;
wherein the operations performed by the second set of slaves are second operations for identifying which of said itemsets occur above a threshold frequency within the plurality of data subsets;
wherein each slave in the second set of slaves performs the second operations for a different subset of said itemsets;
wherein each slave in the first set of slaves and the second set of slaves is a process or thread executed by the one or more processors.
26. The system of
for each of the candidate itemsets, each first slave of the first set of slaves is configured to send a count of occurrences to only a second slave in the second set of slaves that is associated with the candidate itemset, wherein the count of occurrences is a count of occurrences of the candidate itemset in a subset of data assigned to the second slave.
27. A method for performing a multiple-iteration operation for identifying frequent itemsets in a database, the method comprising:
storing, in a first segment of data, a first set of frequent itemsets discovered during a first iteration of the multi-iteration operation;
storing, in a second segment of data, a second set of frequent itemsets discovered during a second iteration of the multiple-iteration operation;
storing a designation indicating that the second segment is readable for a third iteration of the multiple-iteration operation;
based on the designation, determining to utilize the data in the second segment as input during the third iteration;
based on the designation, determining to output results of the third iteration to the first segment;
replacing the data in the first segment with a third set of frequent itemsets discovered during the third iteration;
modifying the designation to indicate that the first segment is readable for a fourth iteration of the multiple-iteration operation;
based on the designation, determining to utilize the data in the first segment as input during the fourth iteration;
based on the designation, determining to output results of the fourth iteration to the second segment;
replacing the data in the second segment with a fourth set of frequent itemsets discovered during the fourth iteration;
wherein each iteration of the multiple-iteration operation is performed by one or more computing devices.
28. One or more computer-readable storage media storing one or more sequences of instructions which, when executed by one or more processors, causes;
storing, in a first segment of data, a first set of frequent itemsets discovered during a first iteration of the multi-iteration operation;
storing, in a second segment of data, a second set of frequent itemsets discovered during a second iteration of the multiple-iteration operation;
storing a designation indicating that the second segment is readable for a third iteration of the multiple-iteration operation;
based on the designation, determining to utilize the data in the second segment as input during the third iteration;
based on the designation, determining to output results of the third iteration to the first segment;
replacing the data in the first segment with a third set of frequent itemsets discovered during the third iteration;
modifying the designation to indicate that the first segment is readable for a fourth iteration of the multiple-iteration operation;
based on the designation, determining to utilize the data in the first segment as input during the fourth iteration;
based on the designation, determining to output results of the fourth iteration to the second segment;
replacing the data in the second segment with a fourth set of frequent itemsets discovered during the fourth iteration;
wherein each iteration of the multiple-iteration operation is performed by one or more computing devices.
Descripción This application claims priority under 35 U.S.C. §120 as a continuation of U.S. patent application Ser. No. 10/867,923, filed on Jun. 14, 2004, now U.S. Pat. No. 7,155,446, which application lists as inventors Thierry Cruanes, Wei Li, Ari Mozes and Benoit Dagville, which application is titled PERFORMING RECURSIVE DATABASE OPERATIONS, and which application claims domestic priority to provisional U.S. Patent Application Ser. No. 60/571,441, entitled PERFORMING RECURSIVE DATABASE OPERATIONS, filed May 14, 2004; the contents of both of which applications are hereby incorporated by reference in their entirety for all purposes. This application is also related to the following U.S. patent applications: Ser. No. 10/643,629, entitled FREQUENT ITEMSET COUNTING USING CLUSTERED PREFIXES AND INDEX SUPPORT, filed on Aug. 18, 2003; Ser. No. 10/643,563, entitled DYNAMIC SELECTION OF FREQUENT ITEMSET COUNTING TECHNIQUE, filed on Aug. 18, 2003; and Ser. No. 10/643,628, entitled EXPRESSING FREQUENT ITEMSET COUNTING OPERATIONS, filed on Aug. 18, 2003; the contents of each of which are hereby incorporated by reference in their entirety for all purposes. The present invention relates to databases, and in particular, to performing recursive database operations. Some computational tasks are especially suitable for recursive processing. One example of an operational task that lends itself especially well to recursive processing is “frequent itemset” determination. An “itemset” is a set of items. For example, one itemset might include the items (apple, banana), while another itemset might include the items (apple, orange), while yet another itemset might include the items (banana, orange). An itemset is “frequent”, relative to a set of data structures, if the number of the data structures that contain all of the items in the itemset is at least a specified fraction of the total number of the data structures in the set. For example, in a set of three data structures, each data structure might represent a different customer's transaction at a supermarket. A first data structure might contain the items (apple, banana, milk), while a second data structure might contain the items (apple, banana, milk, orange), while a third data structure might contain the item (orange). Assuming that the specified fraction is ⅔, the itemset (apple, banana) is a frequent itemset because “apple” occurs with “banana” in two of the three data structures, but the itemsets (apple, orange) and (banana, orange) are not frequent itemsets because “apple” occurs with “orange” in only one of the three data structures and “banana” occurs with “orange” in only one of the three data structures. As the number of data structures in a set of data structures increases, the determination of whether a particular itemset is frequent relative to that set of data structures becomes more computationally intensive. Frequent itemset determination lends itself especially well to recursive processing due at least in part to the observation that an N-element itemset cannot be a frequent itemset relative to a set of data structures unless all of the (N−1)-element subsets of the N-element itemset are also frequent itemsets relative to that set of data structures. For example, the 3-element itemset (apple, banana, milk) cannot be a frequent itemset relative to the set of data structures in the above example unless all of the 2-element subsets of that 3-element itemset, namely, (apple, banana), (apple, milk), and (banana, milk), are also frequent itemsets relative to the set of data structures in the above example. This observation allows the computationally intensive determination of whether itemsets are frequent to be performed for fewer itemsets. The determination of whether a particular N-element itemset is frequent needs to be performed only if all of the (N−1)-element subsets of the particular N-element itemset are also frequent. Thus, for each successive value of N, the group of N-element itemsets for which this determination needs to be performed can be based on the determinations already performed for the (N−1)-element itemsets. Frequent itemset counting is, therefore, a task that can be performed more efficiently using a recursive approach. According to one theoretical approach, frequent itemsets might be determined in the following manner. An application that is external to a database server might send a query to the database server. When executed, the query would cause the database server to select, from a set of data structures, each data structure that contains all of the items in a specified itemset. The database server would execute the query and return the selected data structures to the application. The application might count the selected data structures and determine whether the number of selected data structures meets a specified threshold. If the number of selected data structures met the specified threshold, then the application might place the specified itemset in a set of frequent itemsets. The application might perform the above steps for each 1-element itemset that is a subset of an M-element itemset, one 1-element itemset at a time, and one 1-element itemset after another. Once the application had performed the above steps for each such 1-element itemset, the application might determine, for each particular 2-element subset of the M-element itemset, whether all of the 1-element subsets of that particular 2-element subset are contained in the set of frequent itemsets. If all of the 1-element subsets of the particular 2-element subset were contained in the group of frequent itemsets, then the application might send, to the database server, a query that would cause the database server to select, from the set of data structures, each data structure that contains all of the items in the particular 2-element itemset. The database server would execute the query and return the selected data structures to the application. The application might count the selected data structures and determine whether the number of selected data structures meets the specified threshold. If the number of selected data structures met the specified threshold, then the application might place the particular 2-element itemset in the set of frequent itemsets. The application might perform the above steps for each 2-element itemset that is a subset of the M-element itemset, one 2-element itemset at a time, and one 2-element itemset after another. For each successive value of N, the application might perform the above steps for the N-element itemsets that are subsets of the M-element itemset until N was greater than M or there were no (N−1)-element itemsets in the set of frequent itemsets, whichever came first. Thus, by sending a multitude of queries to a database server in serial manner and counting the results of such queries, the application might determine frequent itemsets that are subsets of the M-element itemset. Unfortunately, considerable overheard would be involved in the above approach. It would take significant time for the application to send the many queries to the database server and for the database server to send the results of the many queries back to the application. Furthermore, because most of the operations performed in the above approach would be performed by the application (the database server would just execute queries and return the results), application programmers would be burdened with implementing the functionality required to perform most of the operations involved in the above approach. These are some of the problems that would attend the above approach. A technique that overcomes these problems is needed. The approaches described in this section are approaches that could be pursued, but not necessarily approaches that have been previously conceived or pursued. Therefore, unless otherwise indicated, it should not be assumed that any of the approaches described in this section qualify as prior art merely by virtue of their inclusion in this section. The present invention is illustrated by way of example, and not by way of limitation, in the figures of the accompanying drawings and in which like reference numerals refer to similar elements and in which: A method and apparatus is described for performing recursive database operations. In the following description, for the purposes of explanation, numerous specific details are set forth in order to provide a thorough understanding of the present invention. It will be apparent, however, that the present invention may be practiced without these specific details. In other instances, well-known structures and devices are shown in block diagram form in order to avoid unnecessarily obscuring the present invention. In order to perform recursive database operations more efficiently, according to one embodiment of the invention, a plurality of first-stage slaves and a plurality of second-stage slaves are established in a database server. In a first iteration of a recursive database operation, the first-stage slaves concurrently process data items and send the results of the first-stage slaves' processing to the second-stage slaves. The second-stage slaves receive the first results of the first-stages slaves' processing and concurrently process those first results. The second-stage slaves store the first results of the second-stage slaves' processing in a data repository. In a second iteration of the recursive database operation, the first-stage slaves obtain the first results of the second-stage slaves' processing from the data repository, concurrently process those first results, and send the second results of the first-stage slaves' processing to the second-stage slaves. The second-stage slaves receive the second results of the first-stages slaves' processing and concurrently process those second results. The second-stage slaves store the second results of the second-stage slaves' processing in the data repository. Subsequent iterations of the recursive database operation proceed in this manner until the recursive database operation has been completed. In each iteration, the first-stage slaves consume the product of the second-stage slaves' processing during the previous iteration, and the second-stage slaves consume the product of the first-stage slaves' processing during the current iteration. Because the first-stage slaves and second-stage slaves are implemented in the database server, the above embodiment makes it unnecessary for an application to send multiple queries to and receive multiple results from the database server during the performance of the recursive database operation. Additionally, application programmers are spared the burden of programming applications to perform the processing that is performed by the first-stage slaves and second-stage slaves. Database server Database server Database In one embodiment, data repository An iteration of the recursive database operation is represented in blocks In block In block In block Thus, if the recursive database operation is not complete, then, during a next iteration of the recursive database operation, the first-stage slaves will, in block In one embodiment of the invention, at least some of the processing performed by first-stage slaves In one embodiment, second-stage slaves In one embodiment, the data items processed and produced by first-stage slaves As is discussed above, the observation that an N-element itemset cannot be a frequent itemset relative to a set of data structures unless all of the (N−1)-element subsets of the N-element itemset are also frequent itemsets relative to that set of data structures allows the computationally intensive determination of whether itemsets are frequent to be performed for fewer itemsets during each successive iteration of a recursive frequent itemset-determining operation. Accordingly, in one embodiment, during an iteration of the recursive frequent itemset-determining operation, at least one of first-stage slaves For example, if items (apple, banana, milk, orange) are the only items that occur once or more in data structures In one embodiment, for each such possible N-element subset, at least one of first-stage slaves For example, if (apple), (banana), and (orange) are the only frequent 1-element itemsets relative to data structures In one embodiment, during the initial iteration of the operation, first-stage slaves In one embodiment, only one of first-stage slaves As is discussed above, in one embodiment, a group of candidate N-element itemsets is generated based on the contents of data repository In order to count these occurrences more efficiently, in one embodiment, the counting is performed concurrently, or in parallel, by first-stage slaves Each of data structures In one embodiment, each of first-stage slaves For example, the contents of data structures In one embodiment, the counting of occurrences of candidate N-element itemsets is performed using either a “bitmap intersection” technique or a “prefix tree counting” technique. Both of these techniques are specifically described in co-pending U.S. patent application Ser. No. 10/643,563, titled “DYNAMIC SELECTION OF FREQUENT ITEMSET COUNTING TECHNIQUE.” In one embodiment, the technique that is used to count occurrences of candidate N-element itemsets is dynamically determined at each iteration of the operation. Thus, the counting technique used during one iteration of the operation may differ from the counting technique used during another iteration of the operation. Techniques for dynamically selecting counting techniques also are described in U.S. patent application Ser. No. 10/643,563. In one embodiment, each of first-stage slaves In one embodiment, each of first-stage slaves For example, assuming the candidate 2-element itemsets of the example above, each of first-stage slaves For another example, if there are fewer second-stage slaves In one embodiment, the candidate itemsets are divvied among second-stage slaves In one embodiment, the processing performed by second-stage slaves In one embodiment, due to the techniques described above, each of second-stage slaves For example, each of first-stage slaves In one embodiment, each particular second-stage slave of second-stage slaves In one embodiment, second-stage slaves In one embodiment, second-stage slaves As is described above, each of second-stage slaves In one embodiment, once a particular second-stage slave of second-stage slaves For example, second-stage slave Continuing the example, if the aggregate count for (apple, banana) is 3, then second-stage slave In one embodiment, each of second-stage slaves In one embodiment, for a particular iteration of the operation, each of second-stage slaves In one embodiment, one or more of first-stage slaves In one embodiment, each particular first-stage slave of first-stage slaves In one embodiment, when a particular second-stage slave of second-stage slaves In one embodiment, for each particular second-stage slave of second-stage slaves In one embodiment, after query coordinator In one embodiment, after query coordinator In one embodiment, after query coordinator In one embodiment, after sending the newly designated “read” segment reference to each of first-stage slaves In one embodiment, after at least one of first-stage slaves Computer system The invention is related to the use of computer system The term “computer-readable medium” as used herein refers to any medium that participates in providing instructions to processor Common forms of computer-readable media include, for example, a floppy disk, a flexible disk, hard disk, magnetic tape, or any other magnetic medium, a CD-ROM, any other optical medium, punchcards, papertape, any other physical medium with patterns of holes, a RAM, a PROM, and EPROM, a FLASH-EPROM, any other memory chip or cartridge, a carrier wave as described hereinafter, or any other medium from which a computer can read. Various forms of computer readable media may be involved in carrying one or more sequences of one or more instructions to processor Computer system Network link Computer system The received code may be executed by processor In the foregoing specification, embodiments of the invention have been described with reference to numerous specific details that may vary from implementation to implementation. Thus, the sole and exclusive indicator of what is the invention, and is intended by the applicants to be the invention, is the set of claims that issue from this application, in the specific form in which such claims issue, including any subsequent correction. Any definitions expressly set forth herein for terms contained in such claims shall govern the meaning of such terms as used in the claims. Hence, no limitation, element, property, feature, advantage or attribute that is not expressly recited in a claim should limit the scope of such claim in any way. The specification and drawings are, accordingly, to be regarded in an illustrative rather than a restrictive sense. Citas de patentes
Otras citas
Clasificaciones
Eventos legales
Girar |