Home » SQL & PL/SQL » SQL & PL/SQL » String comparison...............
String comparison............... [message #4400] Thu, 05 December 2002 01:25 Go to next message
BABU SRSB
Messages: 42
Registered: June 2002
Member
Hi,
in string comparision, which operator is better in which '=' or 'like' operators.

If i use like operator, is that any performance issue.

Please, clarify me about this.

Regards,

Babu
Re: String comparison............... [message #4411 is a reply to message #4400] Thu, 05 December 2002 10:40 Go to previous messageGo to next message
Todd Barry
Messages: 4819
Registered: August 2001
Senior Member
Assuming an index exists on the column, the answer depends on the distribution of the data and the specific string used with LIKE.

An equality check and LIKE 'xxxxxxxxxx%' should be fairly comparable as long as the criteria is long enough to be significant (LIKE 'x%' will bring many more matches).

You'll end up with full-table scans if you use LIKE and the % sign at the beginning of your criteria (LIKE '%xxxxxxxx').
Re: String comparison............... [message #4417 is a reply to message #4400] Fri, 06 December 2002 00:44 Go to previous message
BABU SRSB
Messages: 42
Registered: June 2002
Member
Thanks a lot..

Regards,

Babu.
Previous Topic: regarding conversion of oracle database
Next Topic: How to give defalt value for a column in oracle??
Goto Forum:
  


Current Time: Wed May 15 22:21:12 CDT 2024