FP-growth is a typical algorithm which will not generate candidate itemsets in association data mining. However, in the process of building FP-tree, each node will compare with the original, which greatly affected the efficiency of the algorithm. Based on the analysis of the process of building FP-tree, an optimization method based on hash was proposed in this paper, which can save more time of locating the new item by using a hash table and a hash function. The following experiment proves that the latter algorithm is better than the former one in performance.