by understanding your data, understanding how it shoukd be accessed, using knowdledge of the sql library, by seeing ho long things take. not by comparing a cost of two very different queries