Limit on number of replies for a topic

Discussion of general topics related to the new version and its place in the world. Don't discuss new features, report bugs, ask for support, et cetera. Don't use this to spam for other boards or attack those boards!
Forum rules
Discussion of general topics related to the new release and its place in the world. Don't discuss new features, report bugs, ask for support, et cetera. Don't use this to spam for other boards or attack those boards!
Post Reply
user99
Registered User
Posts: 63
Joined: Thu Jan 04, 2007 9:36 pm

Limit on number of replies for a topic

Post by user99 »

Is there any imposed limit on number of replies for a topic?

Could it easily go upto say 200,000 replies without messing up with DB?

User avatar
Nicholas the Italian
Registered User
Posts: 659
Joined: Mon Nov 20, 2006 11:19 pm
Location: 46°8' N, 12°13' E
Contact:

Re: Limit on number of replies for a topic

Post by Nicholas the Italian »

I'm not sure whether there are other bottlenecks, it may also be db-dependent, but for example phpbb_topics.topic_replies is a 8-byte int field, which allows for values up to 18,446,744,073,709,551,615.
You may think that's a lot, but consider that for each poll you can set up to 4,294,967,295 options.
It seems that phpBB developers took a bit of margin here. :P
Last edited by Nicholas the Italian on Tue Oct 23, 2007 9:14 am, edited 1 time in total.

user99
Registered User
Posts: 63
Joined: Thu Jan 04, 2007 9:36 pm

Re: Limit on number of replies for a topic

Post by user99 »

So does the same figure applies for number of groups that we can setup ? :)

User avatar
Nicholas the Italian
Registered User
Posts: 659
Joined: Mon Nov 20, 2006 11:19 pm
Location: 46°8' N, 12°13' E
Contact:

Re: Limit on number of replies for a topic

Post by Nicholas the Italian »

I think so, but, I repeat, there might be bottlenecks around.

User avatar
Prince of area51
Registered User
Posts: 133
Joined: Mon Jun 27, 2005 8:46 pm
Location: Manchester, UK
Contact:

Re: Limit on number of replies for a topic

Post by Prince of area51 »

user99 wrote:Is there any imposed limit on number of replies for a topic?

Could it easily go upto say 200,000 replies without messing up with DB?
If you are using a decent DBMS, this won't be an issue, I've got tables with million of rows, if you are worried about phpBB handling those rows; v3 is written with exactly this in mind. If the user wants to see the last page of the topic with, say, 200,000 replies, phpBB starts retrieving the posts in descending order (making it far more fast than searching from post 1). Its brilliant ;)

user99
Registered User
Posts: 63
Joined: Thu Jan 04, 2007 9:36 pm

Re: Limit on number of replies for a topic

Post by user99 »

Thats really great :)

So I guess there is virtually no limit on number of topics? (Could handle 10 million?)

Does same goes with number of users? (Could handle 10 million?), especially "Find a Member" not getting struck up?

User avatar
Nicholas the Italian
Registered User
Posts: 659
Joined: Mon Nov 20, 2006 11:19 pm
Location: 46°8' N, 12°13' E
Contact:

Re: Limit on number of replies for a topic

Post by Nicholas the Italian »

In theory, it could handle this and much more (the fields you refer to are either 32- or 64-bit, which means either 4 billions or 16 billions of billions).
In practice, it has to be checked. There are other factors to count other than "available space"; for example, performance in searches. That depends on db engines rather than on phpbb itself; but dbs, when correctly used, tend to be shockingly fast these days. :)
Anyway, as you may know, the biggest forum in the world is Gaia Online; it counts 1.2 billion posts and 10 million users (up to 100,000 contemporaneously). Not only it works, it's also pretty fast. I wonder whether phpBB3 would behave as well, but it wouldn't surprise me.

User avatar
Prince of area51
Registered User
Posts: 133
Joined: Mon Jun 27, 2005 8:46 pm
Location: Manchester, UK
Contact:

Re: Limit on number of replies for a topic

Post by Prince of area51 »

user99 wrote:Thats really great :)

So I guess there is virtually no limit on number of topics? (Could handle 10 million?)

Does same goes with number of users? (Could handle 10 million?), especially "Find a Member" not getting struck up?
One thing I know is that no piece of software will fulfill 100% of your requirements. As you grow, you have to tweak it in one way and other to keep it in 'top-notch' shape. The whole idea is to provide us with the best possible tools. Searching 10 million rows has got not a lot to do with PHP (or phpBB Code), it merely depends on the DBMS you use because its the DBMS doing the search (and not the phpBB code). Obviously, if the search is slow for 10 million users, your developers (or you) can sit down and see how you can optimize the process of a lookup in 10 million rows. At that level, you need to think differently and there is no hard fast rule to achieve the efficiency.

One thing you can check out the phpBB's native full text search (which I think is used an alternative to the DBMS's search). I haven't done a deeper research on that and I think its worth a look into.

Post Reply