Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Between operator

Former Member
0 Likes
5,359

Hi,

In SELECT query, which is prefered performance wise - between or GT & LT operator?

Regards,

Balaji Viswanath.

3 REPLIES 3
Read only

Former Member
0 Likes
1,926

hi,

i suggest you to use RANGES .....

Regards,

Santosh

Read only

Former Member
0 Likes
1,926

Hi Balaji ,

Using Ranges increases performance then using between or LT or GT.

Reward points if useful.

Thanks ,

Surya Pydikondala.

Read only

Former Member
0 Likes
1,926

Hi Balaji,

first of all, there is no difference in performance if you use v BETWEEN a AND b or v GE a AND v LE b. Very often people make the same error than you, thinking that BETWEEN is a synonym for GT & LT. This is not true. BETWEEN a AND b means that the expression returns TRUE if the value is equal to a, b or something in between.

The database handles both expressions as the same statement. Therefore is no difference at all regarding to performance.

Regards

Ralph Ganszky