-
Статья
Reducing Queries to one?
- Автор xenforo2
- RSS Feed XenForo
- 0 Ответы
Can someone please tell me what and how I can do this to minimize the queries:
I am building a class that outputs a page. I fetch the titles of ten threads and then the individual posts from those threads.
These ten threads and posts are almost never changed.
My query looks something like this:
a) 1 query: Fetch threads with thread_id in [1...10]
b) 10 queries: Fetch posts from the individual threads
(Yes, could do this in one go, but I need an example to save a lot of queries)
So...
Read more
Читать далее...
I am building a class that outputs a page. I fetch the titles of ten threads and then the individual posts from those threads.
These ten threads and posts are almost never changed.
My query looks something like this:
a) 1 query: Fetch threads with thread_id in [1...10]
b) 10 queries: Fetch posts from the individual threads
(Yes, could do this in one go, but I need an example to save a lot of queries)
So...
Read more
Читать далее...