Jump to content

Are we missing forum posts?


Go to solution Solved by Stuart Silvester,

Recommended Posts

Posted

Front end shows approx. 2 million posts, but the forums_posts  table contains only 1564317 rows.

Do we have a problem?

Posted

Could you please clarify where you're seeing that count? Keep in mind some database tools like PHPMyAdmin will cache table row counts at certain sizes. In your database, I am seeing roughly 2 million posts in your post table.

Posted

If you're using InnoDB, that number will also only be an approximation. It doesn't accurately reflect the exact number of rows in the table. Additionally, if you have over a certain threshold of posts the widgets use different means to calculate a number. It's less accurate, but counting how many rows are in large tables is very slow.

Posted

Stuart noted what was happening above.  The count there is approximate.  As a result, it does not make sense to try and use it to get a truly accurate number.  

In fact, in the latest version of IPB, the SQL toolbox is removed.  So in a nutshell...  forget about what you're looking at there.  🙂 

Posted (edited)

@Canis - just  a suggestion (one that would be logical instead of the possible cause mentioned above) but have you enabled archiving on your site, which would move content out of your main database and into a separate database?

Or maybe your site is of the older type, pre-4.something, and the old way of the value being cumulative but not not taking account of deleted content (it now does, delete content - bang, it's gone from the count)?

Edited by Nathan Explosion
Posted

Many thanks for all help. 🙂

We have never used archiving. It is 4x.

1.5 vs 2 million seems like a pretty significant difference. How can we be sure that we really have 2m posts?

  • Solution
Posted

You could do something like this to see a more accurate number of posts

SELECT count(*) FROM ibf_forums_posts;

Displaying in widgets and database tools (PMA etc) are never going to show a 100% accurate number due to the way InnoDB works though (and the above count query being slow).

It really isn't anything to worry about though

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...