Just as an aside most DBRMS come with query profiling tools to help you optimize and troubleshoot queries in relation to the schema. EXPLAIN in MySQL has saved me many times, or at least enabled me to ask intelligent questions: http://dev.mysql.com/doc/refman/5.7/en/explain.html