3

I have many, MANY redirects (thousands). Most just redirect the system (node/12345) url to the friendly one - but we also have a lot of others.

I have Drupal set to never delete old redirects after they haven't been accessed for X amount of time, but the mere presence of the option to do so makes me think there's a legitimate reason I may want to.

Is there a lot of overhead? Or is it simply to keep the list manageable? Do people typically delete them, and if so, what's the time frame? Six months? A year?

2 Answers 2

2

Whether to keep redirects is an SEO question. Do you have good search results on Google which you don't want to loose. Or you have external sites or even print stuff that point to your old URLs. Then you have to keep them.

If all this is not true, you can safely delete you old redirects.

About the DB:

The redirects are stored in the url_alias table. It has two indexes for the mapping from nid to redirect url and from redirect url to nid. This means that reading is fast even if you have thousands of redirects.

If you are creating a lot of redirects this can get slow. But this will not hit you for a few thousand redirects. If you have millions you have to dive into MySql details (or whatever DB system you are using) and find what you can do about it. Since you are only adding records to the DB table, there's a lot of DB tuning stuff that can help you.

0

Typical you wont have a big problem with that. But it depends on your site size and your server environment. Having less records in your table is always faster than having a more. Example:

Senario 1 : You have 10 redirects in your database. A user must be redirected and drupal executes the database SELECT function. Then after a very short time the database will return the result because it searches only within 10 records.

Senario 2 : You have 9999999 redirects in your database. A user must be redirected and drupal executes the database SELECT function. Your database server must search within 9999999 records and that may take a while. Also it may crash and go out of memory.

BUT if your redirect records remains constant then you wont have any problems at all. You can keep the redirects as long as you want.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.