posted 22 years ago
In general, the LIKE operator will be an order of magnitude slower than an = operator. Also, a LIKE operator will not be able to take advantage of any indexes which may exist on the operand columns.
However, your sample is so simple, you might not be able to find a difference. For example, if you time the two queries in Oracle, I bet the second one (whichever one is run second) will run fastest. That's because the server will have cached all the results from the first query, then the second query only needs to retrieve from the server cache.