I have a question about the number of selects in a viewpage.
For example We have an auction site similar like ebay.
When the user clicks a parent category, the following view is returned.
A page that shows all the subcategories with the total number of items in it and the most interesting items in these sub categories.
Then a banner (is dependent on the category) is also in the view. And some other advertisement blocks, that are related to the category.
My question is how much selects to the database are needed in order to build such a page?
Is that:
1. One for the banner / advertisement information, based on the parent category?
2 Two, a select for the subcategories and the total number of items in it.
3 Three a select for the most wanted items in this category?
And three selects per viewpage is this a high number of selects? Because
the number of selects is nrOfUsers * 3 (when we cash nothing).
Is it normal to have 3 or more selects per viewpage?
Can it be done in one select?
|