you store seconds in uniq_seconds. Only one positive thing - it's easy to implement. But...
It's not an effective solution. It consumes too much memory and it's slow.