We have a table with a lot of user sessions (basically end -time and length of connection). We would like to query this table to count the max number of simultaneous sessions, but we are stumped on how to do that. The only thing I have been able to think of is to iterate over the entire table and count the number of connections at the beginning and end of each user session, keeping a variable that records the time and max number of sessions at each iteration. We can do this in either in Perl or PL/SQL, but it seems like it would be *horribly* slow, especially considering we have about 250,000 of these records come in a day. I also wonder if there might be some intermediate data structure that we could create to make this easy, but I thought I would rely on other people's experience before trying to do this myself...:) Thanks ---------------------------(end of broadcast)--------------------------- TIP 4: Don't 'kill -9' the postmaster