1. A method for discovering a plurality of frequently accessed subtrees, performed by an electronic apparatus, the electronic apparatus having a storage device and a processing unit for executing steps of the method, the method comprising the steps of: acquiring and storing a plurality of data streams in the storage device, the data streams respectively comprising accessed nodes of a partially traversed theoretical tree; generating an augmented prefix tree (APT) according to each of the acquired data streams; merging the generated APTs into a global prefix tree (GPT) comprising a plurality of first traversal paths and a plurality of second traversal paths, each of the first traversal paths representing a frequent subtree, and each of the second traversal paths representing a non-frequent subtree; and periodically removing the second traversal paths from the GPT.