Here's a very common situation that is very easy to optimize and simplify, submitted via the mailbag.
Let's say you have a database that contains Companies, Products and Stores. Products and Stores are unique to each company -- i.e., they are not "shared" across companies. read more...