Flushing redirection Table

#129295
  • Resolved Marcus Downey
    Rank Math free

    Hello

    I have a regex (permalink change) plus individual redirections set up automatically. The specific table for hits is getting larger over time.

    Is there a simple way to flush this hit data without affecting the redirections inside the plugin?

    I am not sure why we need to tracks hits, seems a sure-fire way to bloat the DB for a busy website.

Viewing 7 replies - 1 through 7 (of 7 total)
  • Hello,

    Thank you so much for getting in touch.

    The data about hits is stored as a number in a single cell of the Redirections table row. It will never take more than a few bytes even if you get billions of hits on a single redirect. If you have 1,000 redirects each with 10,000 hits – even then we are talking about only a few MBs of data.

    If each hit were to be recorded as a separate hit (like it does for Advanced 404 monitor), then it would be of concern but not for the redirections.

    With that said, we do not have an option to automatically flush the redirection hits because there isn’t much use-case for it anyway.

    Our redirections cache is at 2.01Mb after just 6 months, the maths suggest we will be at around 4-6mb or higher by the end of this year, and so forth.

    That’s a lot of bloat and has quickly established itself as one of our biggest tables outside of core WP.

    So I would kindly request you give me an option to flush this data to keep our Db tight and useful.

    Hello,

    Unfortunately, we do not have that option. Sorry.

    However, you can reset the Hit counter easily from phpMyadmin or equivalent like this:
    https://i.rankmath.com/i3Bd9s

    With that said, I have passed your suggestion to the product team and they might add it in one of the upcoming updates.

    Thank you.

    Does hitting the reset on the counter flush the redirections cache table?

    Of should I just go ahead and flush that table also since it’s the big one.

    Hello,

    Thanks for contacting us.

    Resetting the counter on the redirections table will not have an impact on the redirections cache table.

    If you would like you can clear that table. New entries will be added when a user reaches a URL with a redirection.

    Hope this clarifies your doubts.

    Don’t hesitate to get in touch if you require further assistance.

    Yes, it’s that table that is the large one, not the counter table.

    So a simple PHP admin DB table flush will solve the size problem?

    Why do you have a cache for redirections? Just curious about the value of doing that? Hit counter I understand but caching?

    Hello,

    Sure, you can do that via PHP.

    We cache redirections to make them faster. 301s (or others) by default add additional load to your server.

    Hello,

    Since we did not hear back from you for 15 days, we are assuming that you found the solution. We are closing this support ticket.

    If you still need assistance or any other help, please feel free to open a new support ticket, and we will be more than happy to assist.

    Thank you.

Viewing 7 replies - 1 through 7 (of 7 total)

The ticket ‘Flushing redirection Table’ is closed to new replies.