Hey,
I see that the CExistValidator selects a field in order to determine if the specified piece of data exists in the given table.
Everyone knows a COUNT() is faster than selecting a field, so why are you not selecting a COUNT() and comparing it?
e.g.
SELECT COUNT(*) FROM user WHERE username = ‘Somename’
vs
SELECT id FROM user WHERE username = ‘Somename’
In the COUNT query, you simply check if the result is more than 0.
It is much, much faster than selecting a field for absolutely no reason.