Subject Re: [ib-support] Adding index does nothing to select disctinct
Author Thomas Miller
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.

I would be curious if this works.


M Patterson (Multinail) wrote:

>Hi,
>
>We have tables of factory work pieces that grow by hundreds or records daily. I
>want to be able to offer the users a selection of all jobs on rthe table. I
>tried doing
>SELECT DISTINCT(JOB_NUMBER) FROM SAWMEMEBRS
>with out an index on SAWMEMBERS(JOB_NUMBER)
>It was taking 6 secs +- a couple of seconds.
>
>Then I did
>CREATE INDEX SM_JOBNUMBER ON SAWMEMBERS(JOB_NUMBER)
>and there was no apparent speed benefit. I even quiet the test program, got back
>in,listed the indexes, swa that it was there, and still there was no increase in
>speed. That's longer than we'd like to make the users wait.
>
>Am i missing something?
>
>Regards,
>
>Mark
>
>
>
>To unsubscribe from this group, send an email to:
>ib-support-unsubscribe@egroups.com
>
>
>
>Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
>
>
>
>
>

--
Thomas Miller
Delphi Client/Server Certified Developer
BSS Accounting & Distribution Software
BSS Enterprise Accounting FrameWork

http://www.bss-software.com