General information
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
Speed difference between 'like' and '='
Example:
I have table Sample (Code C(10), ...) + regular index on field Code
set dele on, set ansi off, set exact off
1) select * from Sample where code='2215'
... sys(3054) say 'partial'
2) select * from Sample where code like '2215&'
... sys(3054) say 'partial'
3) select * from Sample where code like '__15&'
... sys(3054) say 'none'
Can I use clause 'like' always (speed 1=2) or is it better to look at condition and use it only after occurrence '_&' ?
Pavel Poul
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only