Suppose I have a large table to store ranges of integers. I can do this with two fields:

```
start|end
  10 |210     (represents 10 to 210)
  5  |55      (represents 5 to 55)

```

(quick to select by `end` column), or:

```
start|length
  10 | 200     (represents 10 to 210)
  5  | 50      (represents 5 to 55)

```

(quick to select by `length` column).

What if sometimes I need to select by `end`, and sometimes by `length`, and both queries need to be fast? I could store both:

```
start|length|end
  10 | 200  |210
  5  | 50   |55

```

But then this is not normalised and everyone has to remember to update both fields, and is just bad design.

I know I can select by `start + length` or `end - start` but for a very large table, isn't this extremely slow?

**How can I query by calculated values quickly without storing redundant data - or should I just store the extra column?**