A method of utilizing one or more hints for query processing over a
hierarchical tagged data structure having a plurality of nodes in a
computing system having memory, the hint being positive if there is a tag
accessible in top-down traversal from a child node, and otherwise
negative. For each tag in the data structure, the method calculates a
bitmap for a current node with all bits set to 1 and for each child node,
followed by AND-ing all child bitmaps and setting a bit corresponding to
a tag ID of a current tag to zero if such current tag exists. The method
further sets a bit of a current tag to 0, calculates a plurality of
possible non-redundant hints for each child node, and refreshes a hint
list.