Although efficient identification of user access sessions from very large web logs is an unavoidable data preparation task
for the success of higher level web log mining, little attention has been paid to algorithmic study of this problem. In this
paper we consider two types of user access sessions, interval sessions and gap sessions. We design two efficient algorithms for finding respectively those two types of sessions with the help of new data structures.
We present both theoretical and empirical analysis of the algorithms and prove that both algorithms have optimal time complexity.