Subject | Adding index does nothing to select disctinct |
---|---|
Author | M Patterson (Multinail) |
Post date | 2002-09-12T07:39:16Z |
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
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