0

I'm creating new custom post types and taxonomies for my client and I wanted to prefix their keys so there is no conflict with any plugin that could be installed that would be providing it's own CPT and taxonomies.

At first, I set the prefix to be 3-letter long with an underscore: xyz_ (it's more unique than that and I checked google - there are no conflicts). However, I started thinking of increasing the length of the prefix to make it even more unique to up to 7 characters, like xyzabcd_ (again, just a sample).

However, I'm not sure how such change would impact the WP_Query that loops posts by the post_type column since the value would be longer for my custom post types. The same thing goes for taxonomies... I know that the db column holding that data is a varchar(30) but the actual value stored there would be longer.

Should I be worried about the performance difference here?

Thanks!

0

I'm not sure about the sort of precise figures a performance/algorithm researcher would be looking for.

However, in terms of actual performance there is no difference. The WP database can take a beating and I've done plugins with dozens and dozens of filters and hooks and queries and they still run very very fast.

Furthermore, WP is not known for its speed. It's a great CMS, but cutting-edge performance/speed is not its strength. So I think there's no point in worrying about something as minor as post type length.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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