I have the following SQL statement:
There are just under 550000 records in the table. Showplan states that the query is partially optimized (it was fully optimized until I removed the index on DELETED() - there are no deleted records). However the query takes 3.8 seconds to run.
I thought the query would be almost instant (it is the 2nd time I run the same query). Can anyone advise me if they would have expected a faster execution and perhaps a way to make it faster, or if I am being overly optimistic?
Thanks,
Stewart
Code:
SELECT ContactPic ;
FROM Donation ;
WHERE ContactPic = Contactik AND DonDate = Dated ;
AND WhyFk = whycode AND AlloFk = Allocode ;
INTO CURSOR CheckForDuplicateDon
There are just under 550000 records in the table. Showplan states that the query is partially optimized (it was fully optimized until I removed the index on DELETED() - there are no deleted records). However the query takes 3.8 seconds to run.
I thought the query would be almost instant (it is the 2nd time I run the same query). Can anyone advise me if they would have expected a faster execution and perhaps a way to make it faster, or if I am being overly optimistic?
Thanks,
Stewart