| 
	
 | 
 Posted by Doug on 03/01/06 03:04 
Hmmmm. 
 
I guess I don't understand your comments Mr. Sommarskog.  Dick's 
solution to me is better. It is simpler, and doesn't use dynamic SQL. 
 
Further, I've had the best success with GL's using a composite index on 
Account+Subaccount. 
If you don't know the account, you will end up doing a table scan 
pretty much no matter what. If you know the account and the subaccount, 
retrievals can be VERY fast. 
 
Finally, because Dick's solution doesn't use dynamic SQL, the optimizer 
can key in on the best way to do the search relatively easily. 
 
I look forward to hearing why you don't think the optimizer would 
indexes. They have in my experience. 
 
Thank you, 
Doug
 
  
Navigation:
[Reply to this message] 
 |