Viewing 15 posts - 20,566 through 20,580 (of 22,196 total)
Bummer. Then you'll need to create a compound index, at least based on my tests. The query is basically OK (since you fixed the implicit data conversion, those things will...
April 24, 2008 at 6:33 am
Start here. Then try here. Then go here. You could also do a search of articles here at SQL Server Central.
April 24, 2008 at 6:30 am
I'd check to see if you've got open connections and possibly uncommitted transactions. For it to just degrade linearly over time means that resources are being consumed and not released....
April 24, 2008 at 6:25 am
Absolutely. If you can't find a local copy of books online, you can refer to them at MSDN.
April 24, 2008 at 6:19 am
No, based on the data I tested with, 1000 rows not 7 million, the date column alone didn't supply a selective enough non-clustered index for the optimizer to choose it...
April 24, 2008 at 6:16 am
I thought I had seen that 10% number too. Here's where it's referenced.
April 24, 2008 at 6:11 am
You've effectively got a cursor going on with that query running in the SELECT statement. I'd try it like this:
SELECT a.OrderID
,a.UniqueID
...
April 24, 2008 at 5:34 am
I don't know about the DBCC thing. Sorry.
It sounds like you've got a CREATE statement inside your procedure definition. That's a problem. You'll need to remove that.
April 23, 2008 at 9:06 am
It really depends on the shop. I've worked where I was the System Administrator, DBA and Developer. Now I work for a largish company where we have 14 DBA's. I...
April 23, 2008 at 8:42 am
Nope. Sorry.
The best you can do is write some code to generate the scripts, but you'll need 25 commands for 25 tables.
April 23, 2008 at 8:21 am
Turning a badly performing query into a stored procedure won't improve performance. You'll need to determine what the query is doing. Is the function being done in the best way?...
April 23, 2008 at 8:20 am
If you have to rearrange the columns on the second table, the best way is to drop & recreate the table. Or will that cause issues somewhere else?
Use the MS...
April 23, 2008 at 7:50 am
Excellent points. Very well delivered. You've summarized where I find myself. I think the only real remaining issue I have with my team is that they do want to toss...
April 23, 2008 at 6:52 am
Once you've got the datatype right, it comes down to indexing. I modified your first example to run against AdventureWorks, just so I had something to test:
DECLARE @period DATETIME
SET @period...
April 23, 2008 at 6:45 am
Until you're down to squeezing the last 10-20ms out of a query, I don't think it matters. COALESCE has a lot more flexibility than ISNULL, so, I'd say, if you...
April 23, 2008 at 6:25 am
Viewing 15 posts - 20,566 through 20,580 (of 22,196 total)