I would like to save visits in a table. I am using MySQL but I am not sure how I should save the visits as the records may increase considerably and this might cause performance issues and I am also worried about MySQL limitations (how many records it can handle, etc).
As far as I know, I could do this in two different ways:
First way:
Creating a record for each visit
id | visitor_ip |
---|---|
1 | 111111111 |
2 | 111111111 |
3 | 111111112 |
Second way:
I could create a record and update/increment the number_of_visits
field each visit
id | number_of_visits | visitor_ip |
---|---|---|
1 | 2 | 111111111 |
2 | 1 | 111111112 |
So my question is:
Is there any real difference? There will be a significant performance issue if I choose one approach over another seeing as the number of records in the first approach might be considerably more than the second one?