Fire Boar

Hi, I was wondering if anyone can point me in the right direction here. I've got a couple of SELECT statements, and they seem a little wasteful. Here's the first:

field1 has 350 possibilities, but multiple results with the same field are very likely to be returned, even with very small queries (say 25 entries, 10 or more might have the same field1). field2 is a number between 1 and 6.

Here's the other one:

field1 is the same as before. field3 is a primary key integer with maximum length 6.

It seems a bit wasteful to select loads of entries then discard a good chunk of them via the DISTINCT clause. Is there a better way to achieve the same effect?

Code: |

SELECT DISTINCT field1 FROM table WHERE field2='#' ORDER BY field1 |

field1 has 350 possibilities, but multiple results with the same field are very likely to be returned, even with very small queries (say 25 entries, 10 or more might have the same field1). field2 is a number between 1 and 6.

Here's the other one:

Code: |

SELECT DISTINCT field1 FROM table WHERE field3 IN ('value1', 'value2', ...) ORDER BY field1 |

field1 is the same as before. field3 is a primary key integer with maximum length 6.

It seems a bit wasteful to select loads of entries then discard a good chunk of them via the DISTINCT clause. Is there a better way to achieve the same effect?