Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I'm building a set of plugins... obviously, being plugins, they need to be suitable to a variety of installations. These plugins will keep track of specific types of user activity (namely whether links are clicked, actions taken, petitions sighned, that sort of thing) and provide access to the resulting data to the administrator.

So my question is custom post types vs a specific set of bespoke database tables... I would normally choose custom post types for this kind of data, but a succesfull campaign could result in 10,000s, even, if really successful, 100,000s of actions being recorded. Since the objective of the plugins is to assist people in developing succesful campaigns this is obviously the kind of scale I need to think about, so I am concerned about the possible degredation of wordpress performance if the wp_posts table is are swamped with 10,000s of custom post type entries. Is this a case where I would be justified in creating a new set of database tables to handle my data?

share|improve this question
1  
I would create a new database with a structure that is optimal for the task at hand, with custom indexes, and such. This is an open-ended, vague question though. –  soulseekah Mar 13 '12 at 10:42
    
Thanks Soulseekah. That is my inclination but everywhere I read the advice that, where possible, it is considered best practice to use custom post types and reserve creating extra tables for cases where it is absolutely necessary. Everything I'm planning could easily be managed in custom post types but the question is necessarily vague. It effectively boils down to "if I create a custom post type that could run into 100,000s of wp_posts entries (and many more wp_postmeta entries) will this have a noticeable impact on the performance of a wordpress installation". –  Adam Mar 13 '12 at 11:42

1 Answer 1

up vote 2 down vote accepted

This is one of the few cases i would prefer using custom database tables since you are talking about lots of records (10,000 - 100,000) and since Custom post types use the posts table which will hold many empty fields in the case you describe.

But i guess there is no right or wrong way to do that and it's a matter if opinion since a good (correctly) configured MySQL database can handle a lot more then a few 100,000's records without a glitch.

share|improve this answer
    
Thanks Bainternet... I suspected there would be no right or wrong way and that there might be no real consensus of opinion :-) Since this is for a series of plugins I'll have no control over the wordpress setup they are being used in, so your answer makes sense to me –  Adam Mar 13 '12 at 11:47

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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