You may want to investigate joining S_QOS_DATA (for machine name, QOS, and table_id) and S_QOS_SNAPSHOT (for the value)

Might be faster.

Regardless, that join should not have been that slow which would argue for an inadequately sized database server or a problem with how you are collecting your data - most likely the frequency at which you are collecting it.