Subject Re: [ib-support] Adding index does nothing to select disctinct
Author Svein Erling Tysvaer
Normally, you would not be interested in all job_numbers and something like

select distinct job_number from sawmembers where job_number > something

to get only the newest job_numbers would probably be more appropriate. If
you do this and have a descending index, you should discover a speed
improvement (depending upon how many job_numbers you eliminated).

Set

At 16:26 16.09.2002 +1000, Mark Patterson wrote:
>Thomas Miller wrote:
> > Not that this will work, but try this
> >
> > SELECT DISTINCT(JOB_NUMBER) FROM SAWMEMEBRS
> > WHERE JOB_NUMBER <> 0
> >
> > Several people have reported that by using a bogus where clause on
> > the column that has the index, makes it use the index.
>
>Well, job_number is string so it was
>
>select distinct job_number from sawmembers
>where job_number <> ''
>
>and it didn't make it run any faster.