Re: Recognizing Concurrent Users
- From: smartin <smartin108@xxxxxxxxx>
- Date: Thu, 24 Jul 2008 19:34:49 -0400
H0MELY wrote:
Thank you in advance for your help. Basically what is happening is that after much harping, my department is going to start analyzing the access statistics from the website. This is good news, but the bad news is that up until recently there were no statistics to get at all and the server is not, and will not, be running any statistical software anytime soon. What is basically being delivered to me is a table that contains Action Date-Time, Session Reference, IP, Browser, USERID, USER, Session Start Date-Time and Action.
What I would like to ascertain is the number of Concurrent Users (users on at the same time). I know this isn't going to be exact, but I think it is important to get an idea. I can easily get session a sessions begin time and last activity. The problem is getting all of teh intersections. In my head I can picture how to do it, I just can't seem to put it into query design. Any assistance would be GREATLY appreciated. One more thing, the date/time stamp fields are formatted like this...6/18/2008 7:10:00 AM. It has caused me a little bit of a headache, so I wanted to be sure and relay that. Thanks again and I can't wait for the responses.
-john
Sorry about your headache.
I may not understand your data, but I do not understand how you will get concurrency information without both start /and end/ times for the session*. I don't see how "last activity" helps.
As long as your timestamps are stored as Date types (irrespective of the formatted display), and assuming you have some way to obtain both session start /and end/ times, the solution is simple. Concurrency is evaluated at a point in time, say noon every day. Create a table with a single column called ETime that contains noon times over several days. One row per evaluation point.
Pseudo-Query: select E.Etime, count (S.SessionID) from Sessions S, Evaluations E where S.StartTime < E.ETime and S.EndTime > E.ETime group by E.Etime;
* After rereading, perhaps you are only concerned about concurrent users right now? Well, you still need to know whether users are logged in now, which means you need to know if their session is still open. If you can get at that, the query is a little different, but not much:
Pseudo-Query: Select count (S.SessionID) from Sessions S where S.StartTime < Now() and S.EndTime Is Null;
HTH
.
- Follow-Ups:
- Re: Recognizing Concurrent Users
- From: H0MELY
- Re: Recognizing Concurrent Users
- Prev by Date: Re: Value over ride in Query, Choose the highest value in Query, need
- Next by Date: Re: Update query.
- Previous by thread: Re: OUTLOOK 2007 Address book nightmare
- Next by thread: Re: Recognizing Concurrent Users
- Index(es):
Relevant Pages
|