A quick SQL question
Say for example you have 10 000 products in a table and they all fall into 30 categories.
Now you want to select 50 products from a couple of those categories (could be any amount between 1-30 of those categories pending on how many the user wants).
Do you,
A: make one select query to get all 10 000 products and filter the results yourself.
or
B: make one select query per category(meaning 1-30 queries) and limit each query to 50.
Which would be more efficient?
|