• Resolved rockiger

    (@rockiger)


    Hello,

    I want to create a Kanban board and I have trouble to decide using CPT or custom tables.

    The extension has 4 entities:

    * Board
    * Task
    * Column
    * Project

    I researched for advice, the best recommendation I found was this Stackexchange answer. But I am still torn between CPTs and custom tables.

    Peeking into other project management extensions didn’t help either. Some are using CPTs with ACF and some are rolling their own tables.

    I could imagine using a CPT for board and the task. Additionally, a custom taxonomy for column and project. I worry, that I could run in a dead end with this solution, that is too inflexible?

    Could somebody give me advice, if the solution with CPTs is sufficient or is this solution a dead end? Any opinions appreciated!

Viewing 4 replies - 1 through 4 (of 4 total)
  • Moderator Steven Stern (sterndata)

    (@sterndata)

    Volunteer Forum Moderator

    Using a CPT means that you can use a wider variety of WP’s “normal” functionality to create, modify, fetch, and display your content.

    Thread Starter rockiger

    (@rockiger)

    Thank you. That is what I am thinking, too.

    I am only worried, if I could run in performance problems if I use taxonomies a lot. But maybe my thinking is a case of premature optimization.

    Moderator bcworkz

    (@bcworkz)

    The WP taxonomy schema works reasonably well. Where you can have performance issues is with complex meta queries when there are a very large number of records in the DB. If you anticipate a large DB where there are frequent complex meta queries, I’d recommend at least the frequently queried meta data be located in a custom table that’s optimized for the data schema. This table can be joined to the normal posts table containing your CPT data. It’ll perform much better than the postmeta table would. You can still avail yourself of much WP code for posts, except where custom table data is involved.

    Thread Starter rockiger

    (@rockiger)

    Thank you. Your approach seems very promising.

    In my first implementation I was going away from custom post types. Especially for the tasks, since I have to load a lot per board/page. And using post_meta for that is probably quite slow, if you have to load 500 tasks + metadata.

    I will definitely try your approach!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Custom Post Type vs. Custom Table’ is closed to new replies.