On a well designed system, I've rarely seen the need to use DISTINCT.
If anything, I use it to do analysis on table data or maybe a summary report. Something like this:
SELECTThat will tell me the basic distribution of certain data elements in a specific table. Good for possibly determining whether a column needs a Bitmap Index.
COUNT( DISTINCT( col_1 ) ) col1_count,
COUNT( DISTINCT( col_2 ) ) col2_count,
COUNT( DISTINCT( col_3 ) ) col3_count,
In an OLTP system however, the liberal use of DISTINCT signals (to me) a problem in the underlying model. Obviously not all instances are without merit, but I'd be willing to bet that the majority are an indicator.
How about you? What are you thoughts on DISTINCT? Good? Bad? Indifferent?