PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
I have a general forum which has generated about 18,000 posts in the first 3 months. Needless to say, but this forum is going to continue to get even bigger. Eventually it's going to be .. let's say.. 100,000+ posts. Is it smart to grab all of this data from the database in one query? I don't really know how else I would do it except for using a LIMIT in my query and performing multiple queries, but in the end, wouldn't it take the same amount of time, if not longer, to do multiple queries? Or, is there really no downside to having such an extensive query? Am I worrying about it for nothing?
what lengthy query? A single query for all records in a table isn't a lengthy query, in any form I know.
Do you show all the records at the same time? If so, then a single "big" query is fine. If you are doing pagination, then use LIMIT or whatever your database supports.
that depends on your selection. Grabbing a single table is negligible, typically. Doing a larger join can take a long time. Not using indexes properly, can add a lot of time too.