Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Indexes - is there some kind of time delay?!

Status
Not open for further replies.

ChainsawJoe

Programmer
Dec 5, 2000
154
GB
Hi all

I've added a few non-clustered indexes to a huge table (about 3 million records) but when running queries against it in query analyser it still displays a table scan instead of an index scan and a bookmark lookup.

I'm losing many valueable seconds on this thing..

Given that I've only just set the indexes up and no other data has been added to the table as yet, is there some kind of delay between these indexes actually being created?

Can anyone help?

muchas grassy arse,

CJ

--------------------------------------------------
- better than toast.
Penguins - better than --------------------------------------------------
 
There's not time delay but maybe it's picking up an existing query plan.

Try
dbcc dropcleanbuffers
dbcc freeproccache
(or something like that)

then look at the query plan.
If it still doesn't use the indexes then the optimiser doesn't think they would be useful for the query (rightly or wrongly).
Post the query here so we can have a look.

======================================
Cursors are useful if you don't know sql.
DTS can be used in a similar way.
Beer is not cold and it isn't fizzy.
 
ahahahahahaaaa!!! I'm a complete eejit! I'd set the index on the wrong column (similar name though!)... duh.

Upon changing the indexing everything worked fine! Thanks for those dbcc things Nigel - I'll hang on to em just in case...

:)

--------------------------------------------------
- better than toast.
Penguins - better than --------------------------------------------------
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top