Finding all the occurrences of a twig pattern in an XML database is a core operation for efficient evaluation of XML queries. Recently, Lu
 proposed the
algorithm that uses the
labelling scheme and reported better performance compared with other
holistic twig join algorithms, both in terms of number of elements scanned and stored during the computation. In this paper, we designed an enhancement to further exploit the power of the
extended Dewey ID
. This reduces the CPU cost and also favors indexed inputs. Our algorithm can be shown analytically as efficient as
in terms of worst case I/O, and experimentally performs significantly better.