I have 2 queries which are almost identical except that the criteria is slightly different.
The first query Accountid = "Project1" returns 262,000 rows completes in 1 minute. ( Database has 9,000,000 rows )
The second query Accountid = "Project2" returns 182,000 rows completes in over 7 minutes.
As I stated the queries are identical other than the criteria. The Accountid is indexed and part of a clustered key.
Is the physical storage on the database causing the problem?
Stumped.....
The first query Accountid = "Project1" returns 262,000 rows completes in 1 minute. ( Database has 9,000,000 rows )
The second query Accountid = "Project2" returns 182,000 rows completes in over 7 minutes.
As I stated the queries are identical other than the criteria. The Accountid is indexed and part of a clustered key.
Is the physical storage on the database causing the problem?
Stumped.....