fig1 illustrates , in a block diagram , two example nodes of a partitioned database used to demonstrate the estimation of column cardinality according to the preferred embodiment . node 10 and node 12 are shown , containing table partitions 14 , 16 , respectively . the table in the partitioned database is partitioned between the nodes 10 , 12 . in the block diagram of fig1 node 10 is shown containing estimate function 18 and node 12 containing estimate function 20 . node 10 further contains hash data set 22 and similarly , node 12 contains has data set 24 . according to the preferred embodiment , an initial step of a column cardinality estimation technique is carried out in each of nodes 10 , 12 by estimate functions 18 , 20 , all shown in fig1 . each of estimate functions 18 , 20 generate hash data sets 22 , 24 , respectively . in the preferred embodiment illustrated in fig1 node 10 is shown as a coordinating node which uses combined estimate function 26 to create combined hash data set 28 , and the estimated column cardinality value for the table made up of table partitions 14 , 16 . in the preferred embodiment , estimate functions 18 , 20 and combined estimate function 26 collectively generate the estimated column cardinality value using a selected one of the known techniques of sample counting , linear counting or logarithmic counting . the most appropriate of these known techniques may be selected for use in a given query optimizer in an rdbms based on requirements and system resources available . the manner in which each of the three techniques is implemented in the preferred embodiment is set out below . where a sample counting technique is used , a hash function is applied to each data value of the column and a list of hash values is maintained ( h list ). subsequent hash values are compared to those contained in the h list and are added to the h list if not present . in practice , the h list is maintained such that there is filtering of hash values before entry into the h list . a sampling parameter k and a reference pattern are used . the values to be entered into the h list must have k bits that exactly match the corresponding k bits of the reference pattern . initially k is set to 0 ( all hash values are entered in the h list ). when the h list becomes full , the value of k is increased and the h list is purged of all hash values that do not match the reference pattern to k bits . the reference pattern is typically a string of one values of a length k . as will be apparent , the size of the h list is effectively reduced by half on each increase of the value of k . the column cardinality is found by multiplying the final length of the h list by two to the power k ( 2 k ). the column cardinality is then corrected to allow for hash function collisions with a known adjustment formula derived using probabilistic arguments known to those skilled in the art . in the examples shown in fig1 the hash data set 22 generated by estimate function 18 includes the h list and the related k value . a similar h list with associated k value is calculated by estimate function 20 in node 12 and is shown as hash data set 24 structure in fig1 . in the preferred embodiment , after hash data sets 22 , 24 are generated , hash data set 24 is sent to node 10 ( the coordinator node ). it will be understood by those skilled in the art that the parallel nature of the rdbms described enables node 10 to be selected as the coordinator node . in other embodiments it may be desirable to process the hash data sets by using a process distinct from the nodes in the parallel database . in the preferred embodiment illustrated in fig1 the coordinator node ( node 10 ) computes the overall column cardinality for the two nodes shown in fig1 . node 10 receives hash data set 24 and merges that data set with hash data set 22 to generate combined hash data set 28 . it will be appreciated by those skilled in the art that although fig1 shows combined hash data set 28 as a distinct data structure , the merger may occur by one of the existing hash data sets being extended to include the other . as is described in more detail below , the merger of the hash data sets will depend on the column cardinality estimation technique being used in estimate functions 18 , 20 and in combined estimate function 26 . once the merger of the hash data value set is carried out , combined estimate function 26 carries out a counting and correction step , as is described in more detail below . the result is the estimated column cardinality value for the table . a comparison is carried out in node 10 to determine which of the hash data sets ( 22 , 24 ) has the highest k value . this hash data set is used as a starting point ( primary data structure ) and the values in the h list of the hash data set ( secondary data structure ) are treated as candidates to be entered into the h list of the primary data structure . the resultant merged data is shown in fig1 as combined hash data set 28 . the overall column cardinality is calculated once all values of the secondary h list have been added to the primary h list . this is done by multiplying the final length of the primary h list by two , raised to the power of the final sampling parameter in the primary data structure . the column cardinality estimate for the entire partitioned table is then corrected to allow for hash function collisions , as referred to above . it is also possible to carry out the above technique for multiple nodes . it is possible to incrementally update the combined hash data set 28 by serially receiving estimate data structures from such multiple nodes . the values in each data structure are transferred to the coordinating node to create the combined estimate data structure in the manner described above . this process is continued until all data structure estimates are received from all nodes in the database . in the sample counting technique implementation of the preferred embodiment , the hash data sets from other nodes are received in the coordinator node and are maintained in a queue for processing . a combined hash data set sampling parameter k ′ initially set to zero and , until the first hash data set arrives from another node , the value of k ′ is set by the coordinator node in the manner described above as it generates a hash data set using the sample counting technique locally . when other hash data set elements are in the queue for processing , the combined hash data set sampling parameter k ′ is increased and the global h - list is purged whenever : 1 . the combined hash data set reaches a maximum defined size , in which case k ′ is increased by 1 , one purge is executed and the number of masking bits in the reference pattern is increased by 1 ; or 2 . the sampling parameter k of an incoming hash data set from another node is larger than the value of k ′, in which case ( k - k ′) purges are executed on the combined hash data set , the number of masking bits in the reference pattern is increased by ( k - k ′), and k ′ is set to the value of k . the column cardinality for the table is obtained by multiplying the final length of the combined hash data set by 2 raised to the power k ′ and this product is then corrected for hash - function collisions , as described above and known in the art . in an alternative implementation , a different estimate technique is used in the nodes and in the calculation of a column cardinality estimate for the entire table ( across all nodes containing partitioned portions of the table ). instead of using the sample counting technique described above , a linear counting technique may be used . this linear counting technique is known in the art and is referred to in astrahan , et al ., above . in this implementation of the preferred embodiment , the linear counting technique is carried out on each node . according to the linear counting technique , a bit vector is produced . the linear counting technique hashes each value of the column in the node to a bit position in a bit vector . the vector is initially set to be all 0 &# 39 ; s . where the data in the node in question has a given value , the corresponding bit in the bit vector is set to 1 . when all values in the column in the node have been hashed into the bit vector , the number of distinct values may be derived by counting the number of bits that are set to 1 , and adjusting the count with an adjustment formula , derived using probabilistic arguments , to allow for collisions ( distinct values in the column that hash to the same location ). the linear counting technique is used in the alternative embodiment as follows . the linear counting technique is carried out at each of the nodes in the database ( in the example of fig1 nodes 10 , 12 ). each node is constrained to use the same hashing algorithm and the same - sized bit vector in carrying out the linear counting technique . when all column values have been hashed on a node , and without further processing of the bit vector at that node , the bit vector is sent to a single coordinator node for that column ( node 10 in the example of fig1 ). the coordinator node then performs a logical inclusive or on each bit vector together into a single bit vector . the or - ing of the n bit vectors is carried out bit - wise : for each bit position l in the resultant bit vector r , the value is a 1 if and only if the value is 1 in one or more of the input bit vectors . once a combined bit vector is calculated ( combined estimate 22 in fig1 ), the known steps are carried out to determine the estimate for column cardinality for the database as a whole . as with the sample counting variant , the bit vector for the database may be incrementally constructed by logically or - ing the combined estimate bit vector with bit vectors from different nodes in the database as they are received by the coordinating node . a further implementation of the preferred embodiment involves the use of the logarithmic counting technique known to those skilled in the art ( see astrahan et al ., above ). the logarithmic counting technique is used on each node , producing a bit map for each column on each node . the details of the logarithmic counting technique are as follows . for each data value in a column in a node , a binary hash value is calculated . each binary hash value is then transformed by a function which leaves only the leftmost ‘ 1 ’ bit in the binary value unchanged , all other bits being set to zero . each transformed value is then or - ed into the bit map for the node . when all data values of the columns have been processed , the estimate for number of distinct values in the column is calculated by dividing 2 raised to the power n by q , where n is the position of the leftmost ‘ 0 ’ bit in the bit map , starting with zero on the left , and q is a parameter specified by the size of the bit map used . for example , q 0 . 7735 when a 32 - bit map is used . the values of q for different sized bit - maps are known to those skilled in the art . the logarithmic counting technique is used , in this implementation of the preferred embodiment , at each of the nodes in the database . the technique is constrained to use the same hashing algorithm , the same transformation function , and the same - sized bit - map at each node . when all data values have been processed on a node , the resultant bit map is sent to a single coordinator node for that column . the coordinator node carries out a logical ( inclusive ) or of the bit - maps ( in a bit - wise fashion ). the result is a bit - map for the database as a whole . the technique of logarithmic counting is then carried out on this combined database to calculate an estimate for the column cardinality of the entire database . as with the sample counting and linear counting approaches described above , the logical or - ing of the bit - maps in the coordinator node does not need to wait until all bit maps have been received . the bit - map for the table may be incrementally defined . as may be seen from the above description , in the preferred embodiments of the invention , a merge step is carried out in the coordinating node ( node 10 in the example of fig1 ). where column cardinality for different columns is estimated to assist in query optimization , it is possible to improve the techniques set out above using parallelization . in the merge step described above , the coordinator node computes the overall column cardinality for the c columns of a given table in a sequential manner , and that the other nodes are idle during this time . for a table t with c columns c 1 , c 2 , . . . , cc , the computation of the column cardinality for column ci , is independent from the computation of the column cardinality for another column cj ,. it is possible to assign the computation of the merging step for each column to a different node , thereby computing that step for different columns , in parallel . to achieve this parallelization , a plurality of nodes will be identified as coordinator nodes , and each column is assigned to one of these nodes . the estimate data structures will be sent to the appropriate node as defined by the column assignments . the process of identifying the plurality of nodes which will participate in the final steps of the technique is carried out based on the total number of nodes across which the table is partitioned and the total number of columns in the table . if the number of columns is greater than the number of nodes , then all the nodes are eligible to participate in the merge phase . each node will compute the overall column cardinality for an average of c / n columns , where c is the number of columns in the table and n is the total number of nodes across which the table is partitioned . however , if the number of columns is less than or equal to the number of nodes across which the table is partitioned , then only c & lt ;= n nodes are eligible to participate in the final step of the algorithm . each of the c nodes computes the overall column cardinality for one column of the table . where maximum parallelization is not required , other approaches to assigning coordinator nodes may be used . although a preferred embodiment of the present invention has been described here in detail , it will be appreciated by those skilled in the art , that variations may be made thereto , without departing from the spirit of the invention or the scope of the appended claims .