Viewing 15 posts - 5,986 through 6,000 (of 7,608 total)
does the order of predicates in where clause matter?
Not generally. But CASE WHEN conditions are always evaluated serially (as far as returning a result is concerned), so in that...
June 27, 2014 at 2:51 pm
Also, be sure the relevant non-DBAs properly enable IFI and other local/policy/Windows permissions that are needed for SQL accounts, proxy accounts, etc..
June 26, 2014 at 12:25 pm
Yes, you can create a non-clustered index w/o a clustered index, but you (almost) never should.
The cluster key does not have to be defined as unique (SQL will internally make...
June 26, 2014 at 11:40 am
Honestly the DBA should have admin access to the server to have maximum effectiveness.
If you don't, and in particular if you don't have direct directory access/control, be extraordinarily careful before...
June 26, 2014 at 11:35 am
You can't have a
GO
within a stored procedure. The first GO ends the stored procedure definition.
June 24, 2014 at 3:24 pm
Don't use a simple UNIQUE constraint. You have to define a primary key, and the only way it's really useful to your query is if the first column in...
June 24, 2014 at 3:06 pm
I'd strongly urge you to use a character-based method rather than simply trying to CAST to numeric, which is almost certain to cause a non-numeric data exception.
SELECT valid_id, SUBSTRING(valid_no, PATINDEX('%[^0]%',...
June 24, 2014 at 2:57 pm
Table variables don't ever get statistics.
Be sure to specify the appropriate clustering key on either table variables for temp tables. Than can make a vast difference in the performance...
June 24, 2014 at 2:43 pm
rquest7 (6/22/2014)
June 24, 2014 at 12:41 pm
If you have time, add a rebuild step to your process:
1. I remove very old records:
DELETE FROM ArchiveDB..a_tblLog WHERE PKID < ?
1B. Rebuild a_tblLog table WITH ( FILLFACTOR =...
June 24, 2014 at 11:05 am
Igor Micev (6/20/2014)
ScottPletcher (6/20/2014)
Is snapshot isolation in use?
The fact that his delete had been waiting to commit tells you that it's not a snapshot isolation level in use.
No, it does...
June 20, 2014 at 1:31 pm
Taking a higher-level view, what's most important for performance of very large tables is making sure the clustered index is based on the best column(s). That can often eliminate...
June 20, 2014 at 1:27 pm
Are you just trying to determine the relative Saturday# within the month? If so, there are methods with vastly less difficulty and overhead.
June 20, 2014 at 1:05 pm
Does the read query use "WITH (NOLOCK)"?
Is snapshot isolation in use?
June 20, 2014 at 12:57 pm
Minor correction:
t.TransactionDate >= 'Apr 2014' AND
t.TransactionDate < DATEADD(mm,1,'Apr 2014') --"<" rather than "<="
June 18, 2014 at 2:20 pm
Viewing 15 posts - 5,986 through 6,000 (of 7,608 total)