Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
+4 votes
719 views
in Q2A Core by
edited by
My site is close to reaching 2 million posts (141803 questions, 1203444, answers, 540896 comments and 4616 users - There is also hidden content)
For now, the performance of Q2A is very good. The only problem my site has (Temporary unavailability) is not related to Q2A.
But, I worry, can there be any problems when I get more posts?
Q2A version: 1.7 and 1.8

1 Answer

+1 vote
by
selected by
 
Best answer
There is no real answer to your question because it is to vague. It is not clear what a "problem" is for you nor what "more posts" mean either.

When you need to search for something, the more elements you have, the more time it will take (that usually applies to most things in life). If you consider getting slower queries a problem, then I'm sorry to tell you that will happen. How slow they will run will depend on the amount of posts and the resources the hosting company has assigned.

Queries that take many seconds or even minutes might generate other issues such as timeouts (depending on server configuration) which usually result in an awful-looking error in the client side.

The last thing to consider is that there is a hard limit on the amount of posts you can have and it is 4294967295. I hardly believe someone has ever reached that number.

Just monitor your site and make sure no query takes more than 5 seconds. If they do, then there might be some issue either with your hosting company, a plugin or the Q2A core (in order of likeliness). And of course, you have already a much more serious issue with that "Temporary unavailability" error you're getting, which by order of likeliness should be a hosting company issue :)
by
How you came up with number 4294967295, limit for amount of posts?
by
It is based on the data type of the field postid in the posts table
by
I know 4294967295 is a very big number to hit by any site....but still.....if any QA site will be popular like facebook .....billion users :)

Is it possible to create another table for postid after postid hits 80%, once it reaches 100% then start using another postid? is this logic possible? so that there will be no limit to add QA.

also what are other architectural changes in core are required?
by
Just alter the table and turn the field into an unsigned BIGINT along with all references to it. Limit will be 18446744073709551615 and actually half of it as PHP handles signed integerS (assuming 64-bit platforms). BTW, by the time this actually becomes an issue, 64-bit platforms will no longer exist
by
Thank you very much for your great answer, Pupi.
The problem that my site has is caused by the garbage collector of PHP.
http://question2answer.org/qa/53513
It is a bug that usually only happens in Debian/Ubuntu, but I have a CentOS server.
by
Welcome. Yeah, awkward issue (I've been using Debian at home since 2009 and never faced this before). Maybe you can ask your hosting company to take a look at it
by
@pupi1985, thanks for the detail explanation. We can detect platform using php then why we are not changing postid to BIGINT on 64 bit platform by default.
by
Regardless of the additional space it will consume, indexes will grow in size. Bigger indexes make searches slower
by
oh, Ok. I feel we should put documentation about this somewhere if some qa site hits this number 4294967295.
...