This a dummy query that illustrates what I am trying to do. In essence I have one main table with ID\'s and then two sub-tables. What I am trying to optimize is when it finds a