Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6543467
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T11:21:00+00:00 2026-05-25T11:21:00+00:00

I am developing a website in which it is important to keep track of

  • 0

I am developing a website in which it is important to keep track of EVERY click and EVERY impression that EACH client makes.

So I have a database which includes (among others) two tables: “clicks” and “impressions”. The table “impressions” has the following structure:

ip int unsigned not null,
ts int unsigned not null,
main_post int unsigned not null,
side_post int unsigned not null,
PRIMARY KEY (ip,ts,main_post,side_post)

So there are few columns and they are all of the int type, so it is an efficient table. HOWEVER, what worries me is that this table will grow incredibly fast. With every request, five new rows will be added to this table, because there are always five side posts next to each main post. Plus, with every request, I will want to check this table to make sure I am not showing the same post again to the client.

The “clicks” table is similar, but less extreme (only one row gets added per request).

So my question is: will this be to much? Will this tables, after a few weeks or months of use, become too big to handle? And if yes, what is the best solution? Maybe starting a new table each week, or each month?

Thanks in advance

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T11:21:01+00:00Added an answer on May 25, 2026 at 11:21 am
    • How many clicks per day are you going to be handling?
    • How many impressions per day?
    • How long are you going to keep records?
    • If a user doesn’t visit for a month, do you need to know what he saw on the last visit?
    • What about if a user doesn’t visit for a week?

    Answers to these and related questions will dictate what you need. However, if your site becomes extremely popular and you decide you really need long histories, then the table will become unmanageable. You have a table with 16 bytes per row; you have an index on that that is likely to cost you 20-24 bytes per row (with a bit of overhead). Thus, for each page impression, you are going to be using 200 bytes or so in your impressions tables. At N pages per second, you’ll be using about 20×N MiB/day.

    I’m not clear how you are going to structure your queries against this table to ensure that the user is not shown the same material again. I don’t know if you are thinking that IP is IP address (have you heard of IPv6?) and TS is a timestamp. I’m not convinced that IP address is an appropriate way of tracking users (the same user may have multiple IP addresses over the course of a day – connecting from the office and from home, not to mention the coffee shop). I’m not sure that the PK index is going to help your queries very much.

    When you know how you plan to use the data, then you can decide how to store it.

    My strong suspicion is that you will find this design too onerous. The table is big enough that your queries are going to slow you down dramatically. Yes, I believe you will need to manage the table carefully, dropping old data routinely while retaining the most recent data.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

OK, I have a website which I am developing for a client. This website
I'm developing a website which to begin with will have three clear sub sites:
I'm currently developing a website which stores bookmarks in a MySQL database using PHP
I'm developing a website using EPiServer. I have a form which submits to itself.
I'm currently developing a website which will have heavy load, and a certain amount
I'm developing a website for a client, in which they want to be able
I have recently been developing a website which relies a large part on the
I'm developing (.NET MVC) a large website which has the following specifications: Database pages
I'm currently developing a website, into which I've included a filter that attempts to
I am developing a website which needs to support multiple langauges. I know that

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.