Database structure for thousands of posts

I need to make a large custom customer database and was how to structure it in WP. It will run without woocommerce or anything. The client will not have access to the dashboard. There will be approximately 10,000 customers.

The data is rather simple. Each customer needs the following:

  • Name
  • Email
  • Customer ID (not post ID)

Also each customer need a transaction history including:

  • Name of the product
  • Date
  • Amount purchased

My inital idea was to make a CPT (customer) and store all data as metadata for the post. I'm a bit in doubt how to effectively store the transaction history. It could be stored as an array in metadata containing each transaction as a subarray.

My general worries are

  1. That the postmeta for transactions will get too long if a customer has 10+ purchases
  2. That the general database handling for retrieving post meta will be extremely slow.

So I'm seeking advice on how to structure a setup like this so it will be fast and also scaleable.

Topic post-meta scale database Wordpress

Category Web

About

Geeks Mental is a community that publishes articles and tutorials about Web, Android, Data Science, new techniques and Linux security.