Using 2n2222 to switch relay on/off with 3.3v

Ideally, that should be dictated by the application or performance required.