The application discloses a method for performing hash connection of a
distributed database, and relates to the technical field of distributed databases, which comprises the following steps: setting a relative inclination rate, calculating the product of the relative inclination rate and table data volume to obtain an inclination threshold; obtaining a
heat map of table statistical information, screening elements in the table which exceed the inclination threshold to obtain an inclination value; expanding the table statistical information by using the inclination value; executing an
SQL statement to obtain two input data tables, generating a hash connection physical plan by using the new table statistical information, performing hash distribution, average distribution or mirror distribution on tuples in the input data tables according to the plan, and after each node receives the tuples of the input data tables, establishing a
hash table by using input data table data with
small data volume, performing detection by using input data table data with large data volume, and finally performing a set union on the hash connection results of each node, so that the set union is the final hash connection result. The application can realize balanced distribution of tasks and shorten the total
SQL execution time.