Question: Is there a performance difference between using a BETWEEN clause or using <= AND >= comparisons?

i.e. these two queries:

```
SELECT *  
  FROM table  
 WHERE year BETWEEN '2005' AND '2010';  

```

...and

```
SELECT *  
  FROM table  
 WHERE year >= '2005' AND year <= '2010';

```

In this example, the year column is VARCHAR2(4) with an index on it.

Answer: 
Actually it depends on your DBMS engine.

Some database management systems will compute twice your expression (once for each comparison), and only once when you use `BETWEEN`.

Actually if the expression can have a non-deterministic result `BETWEEN` will have a different behaviour, compare the following in SQLite:

```
WHERE RANDOM() BETWEEN x AND y -- one random value generated

WHERE RANDOM() >= x AND RANDOM() <= y -- two distinct random values generated

```

This can be very time consuming if your expression is (for example) a subquery.
You better check your execution plans because there can be some weird edge cases where `BETWEEN` can have a different execution plan from the standard >= and <= combination.

<https://blog.pythian.com/oracle-can-between-and-greater-than-or-equal-to-and-less-than-or-equal-to-differ/>

Caveat emptor obviously. But since execution plans can change over time and I really do not have an appetite to test such things, I rather not use BETWEEN at all.

Sometimes less choice is better.