substr versus like - which is least costly
I'm looking to learn some basic principals.
What is the basis for determining which is least costly between SUBSTR and NOT LIKE
My SQL at hand is too simple, and my table too small, to see a difference only by runtime or explain plan.
select code_code, description
from codes
where type_code = 'GEO'
and stop_date is null
--and substr(description,1,8) != 'UNINCORP'
and description NOT LIKE 'UNINCORP%'
Edited by: RackoWacko on Oct 24, 2008 4:00 PM
Edited by: RackoWacko on Oct 24, 2008 4:01 PM