That was actually my original plan.

The issue I have with that is when looking at the main console page that
lists all the user's redirects, and the basic info page (before the user
expands the details pane to see detailed hit info), all I display is the
amount of hits the redirect has.

If I keep a separate hit counter table, I can use that when displaying the
basic stats. Also, the query is a quick select, which would allow a direct
seek operation, rather than having to do a scan on a much larger table,
compile the records, etc.

It's for performance more than anything.


On Thu, Oct 31, 2013 at 3:01 PM, Marcus F <[email protected]> wrote:

> Can't you just use a timestamp and SQL WHERE instead?
> Instead of having three hitCounters, cant you just save a timestamp of the
> date when the person made their shortURL?
>
>
> On Wednesday, October 30, 2013 1:22:36 PM UTC-5, Jason Allen wrote:
>>
>> Hi Marcus,
>>
>> Since you raised the point, I'm going to direct this to you.
>>
>> You mentioned wanting stats on a shared short url being specific to when
>> you created it, not just the redirect from when it was originally created.
>>
>> For instance; let's say there's an existing shortened url to openbd.organd 
>> it already has 11,000 hits. Then you create a short url to
>> openbd.org. Right now, you would just see how many hits the redirect
>> has, and in order for me to compile the hits since you created it, I'd have
>> to scan the big hitDetail table for any hits since the date you created it.
>>
>> I'm thinking about just creating multiple hitCounter entries. This way,
>> when a redirect is used, I simply +1 whichever records match that URL.
>>
>> In the case of 3 users owning the same redirect, there would be 3
>> different hitCounters in play.
>>
>> I'd have to add a 'userID' column to the hitCounter table to
>> differentiate whose redirect was which.
>>
>> But to me, for simply displaying the hits, it seems far more efficient to
>> keep multiple hit counters for a single url than keep one master hit
>> counter and have to compile the hit count for the others.
>>
>  --
> --
> online documentation: http://openbd.org/manual/
> http://groups.google.com/group/openbd?hl=en
>
> ---
> You received this message because you are subscribed to the Google Groups
> "Open BlueDragon" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> For more options, visit https://groups.google.com/groups/opt_out.
>

-- 
-- 
online documentation: http://openbd.org/manual/
 http://groups.google.com/group/openbd?hl=en

--- 
You received this message because you are subscribed to the Google Groups "Open 
BlueDragon" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to