如何统计独特的访客并在特定时间后重新计算?

I've got very thinkable problem and need help of which is the best way I should follow

Note

I'm talking about 10K hits/day

Missions

  1. Not using too much of my hosting server resources
  2. Not getting my site slow loading

Problem

I have a website that would give a point upon each unique visitor came.

  • If that visitor came again in less than 12 hours since his last visit then he would not counted.
  • If that visitor came again after 12 hours, he would be counted as a new visit and will get one more point.

Now,

There are many methods to do this but it looks like they are not good enough for websites with huge traffic.

If i record IP and time in database of every visit and if that visitor came again then i'll compare it by ip and time. To know if it was a new visitor of a new ip or an old one who came within 12 hours or after 12 hours.

That may take time and slow the whole website down.

So any idea or strategy how to do this ?

I've been thinking about Tracking unique visitors of the best answer of Glenn Nelson but in my case i need to recount the visitor as unique every 12 hours.

Have you thought about using cookies? You might use:

set cookie expire time for 12 hrs.
    if cookie_expired
        give more points
    else
        renew cookie

Just a simple idea, I am not totally sure if it is quicker but assuming that you have users you'll need a cookie anyway.