I like to work with small IDs. Is there a way to automatically re-use the IDs of trashed* items? (* when using "empty trash")

Is it safe to run this query:


Is there a risk that it could messed up my existing IDs? Would it automatically allow me to re-use the previous ID (the one trashed) before creating (incrementing) new ones ?

1 Answer 1


That practice would actually be terrible for SEO. You would be hurting your search content by regularly replacing content on the same id. Aside from that, even if you did reuse the ids, they would still continue to get larger,but at a slower rate. This is because you wouldn't have access to ids that are smaller than the last remaining id.

Ex: if you have articles with ids 1-6 and delete 2,3,5,6 your plan would only allow you to reclaim 6. The auto increment function is never going to allow the ids to be created out of order, because that would result in a primary key conflict.

  • Ops! I did not think about SEO... Thank you for your precious advice, I will let it go.
    – JinSnow
    Nov 23, 2014 at 14:40

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.