View Single Post
Old 11-05-2002, 02:17 PM  
Bad B0y
Confirmed User
 
Join Date: Aug 2002
Posts: 160
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?
Bad B0y is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote