In reply to Mike Stott.

Peter Shaw is right.

I recently needed to build a rather complex site with lots of custom data. There was a highly-rated plugin in the WP repo that could get me 80% of the way. But it used custom tables. Trying to go the other 20% was a nightmare. So I re-wrote the whole thing, with no custom database tables — and voilà!

Is it slow? According to you, it should be. But it's actually faster than the plugin was. Why? Tom Nowell has explained why:

"When you fetch a post from the database, WordPress takes some initiative and fetches all of its post meta at the same time. So your code doesn’t trigger queries to fetch post meta from the database on the current post. Retrieving post meta values for the current post is essentially free. Combined with object caches such as Redis or Memcached, this makes post meta incredibly fast." (https://tomjn.com/2017/02/27/not-post-meta-bad/)

The problem with using postmeta, as Nowell has also explained, only comes if you search for posts from postmeta. Essentially, that's doing things backwards. In such cases, you should be using custom taxonomies instead. (I can vouch for this approach. My re-written plugin uses taxonomies instead of meta whenever I need to go in that direction.) This is precisely what custom taxonomies are for. Then you get speed, resilience, and re-usable code with familiar hooks.

I suggest you have a chat with Nowell. After all, these days you share an employer.