I’ve seen in various places, including the WordPress admin and on this page, that using string based identifiers is “strongly not recommended for performance reasons”.

I understand that looking up a string in the database is slower than looking up an integer, but in my experience it’s never a huge difference, assuming the slug field has a fulltext index.

Why is there such a strong discouragement of using this method?

2 Answers
2

This is much more complex than looking up string versus integer. WordPress sifts permalink through a set of persistent regexp-based rules. And it affects logic a lot that string might be many more things than number. See one of better writeups on topic for details.

Practical point to know – this doesn’t concern most sites, except those that have many pages (like PAGE pages, not posts).

Even better point to know – this is all getting fixed in WP 3.3 and will be thing of the past.

Leave a Reply

Your email address will not be published. Required fields are marked *