Seeding joins across tables with constants

From: Ian <kellizer_at_hotmail.com>
Date: 3 Aug 2003 13:17:41 -0700
Message-ID: <17ce58cf.0308031217.18cb5753_at_posting.google.com>



Is it more efficient to join tables by using knowning constants or by reference to the primary/foreign key relationships in Relational theory?

For example if companyColumn = 1, and both tables hold companyColumn values, is it more efficient to say

Join between table A and B is on companyColumn and userID

WHERE A.companyColumn = BcompanyColumn and A.userID = B. userID and a. companyColumn = 1

OR

WHERE B.companyColumn = 1 and A. userID = B. userID and A.companyColumn = 1

The reason this question is posted as that I'm finding that progress 91d is not as efficient as 91c when trying to join on know constants(choosing the correct index). What is the relational theory standard for this pattern?

Thanks for any advice.

Ian. Received on Sun Aug 03 2003 - 22:17:41 CEST

Original text of this message