[thelist] Impact of LIKE in sql
Joshua OIson
joshua at alphashop.net
Thu Dec 14 08:58:36 CST 2000
What is the impact of the number of characters in a LIKE clause in most
databases. If you have the opportunity to break the data down a little bit
and perform a shorter LIKE comparison and a strict comparison, does the
shortened LIKE string compensate for the now 2 conditionals?
If you had to choose between queries, which (generally) would be better?
1.
SELECT id
FROM foo
WHERE sentence LIKE "joshua (living in georgia) is a programmer%"
2.
SELECT id
FROM foo
WHERE name LIKE 'joshua (living in georgia)'
AND statement LIKE 'is a programmer%'
More information about the thelist
mailing list