A quick question on the performance of the SELECT statement. I have a table with a set of 50 products, each product has about 10 attributes associated with it.
The user will select certain aspects of a product (height, weight, colour, length etc.), and many products may display a particular attribute, which is why one select may not give me the results I am after. (I also want to display the top 5 products in order of relevance.) At the moment, I am making 12 individual SELECT statements in the code and using the results to allocate a rank to each product found in that SELECT. e.g. the first select would be SELECT * from table where weight > 100; and each product in the result would be allocated 1 point - the second search would be for height > 30, and so on. Is there a problem with doing multiple SELECT statements (I am using php) or would this be common place. Is there an alternative way of doing this search using the SELECT or some other statement ? I'm just interested to see if I'm being too demanding on the SQL server, as there is a potential that up to 10 users per minute may use this search.