Index the sql