|
Posted by Stephen Howe on 01/11/07 14:49
> a) why is this happening? Is it a bug in my code, or in SQL server?
> b) is it worth detecting it and fixing it automatically? I.e, should I
> put some code in that notices that a query is running far too slowly,
> then runs "DBCC DROPCLEANBUFFERS; DBCC FREEPROCCACHE"? Or will that
> cause other problems?
Pardon me but
Why did you not say which version of SQL Server you are running on?
And why not mention the version of MDAC you have installed (since you posted
to microsoft.public.data.ado)?
And why not mention something about the Primary Keys & Indexes of the table
you are querying - I take it you have an index on MyKey?
And have you checked the documentation, whitepapers, MSDN for details on
query performance?
And have you checked the query plan in Query Analyser?
Cheers
Stephen Howe
Navigation:
[Reply to this message]
|