Hi,

I am using SQL Server 2000 and all I know about Indexes so far is theoretical reading about the subject, never had to create one.
I now see the need to create some indexes.

I have a query which I have inherited from someone else's similar to the following:

INSERT INTO A (x,y,z)
SELECT(x,y,z) FROM B
WHERE StartDate >= '21-03-2008) AND EndDate >= '31-03-2008'

Create index ix_X on dbo.B(x)

This alone Selects over 15 million records and I used the "set showplan_text on" on the Select to find out the actual created index is not being used at all.
The select is doing a table scan which takes ages.
My question is: Shouldn't the Index be created before the INSERT INTO SELECT statement? And is it worth created an Index at all in this case if so what will be the appropriate Indexes to speed up the statement as for what I know Indexes slows down inserts.

Thank you

luta