Viewing 15 posts - 5,956 through 5,970 (of 7,608 total)
Not sure specifically what you're looking for, maybe this can help:
;WITH
cteTally10 AS (
SELECT 0 AS tally UNION ALL SELECT 1 UNION ALL SELECT 2 UNION ALL...
July 14, 2014 at 1:05 pm
Ed Wagner (7/14/2014)
July 14, 2014 at 12:31 pm
A computed age column could not be persisted in any event because it uses a non-deterministic value (todays_date).
Whether you use the MONTH+DAY version or the -YEAR version could be based...
July 14, 2014 at 11:53 am
For (very) large tables, typically you do any massive updates in batches if at all possible. Do them by clustered key range; that is, start at a given cluster...
July 14, 2014 at 11:37 am
philosophaie (7/14/2014)
I have a table: Employees with a column: DepartmentID.
I have another table: Departments with a column: ID that...
July 14, 2014 at 11:34 am
Not directly, but you could easily generate that code using sys.columns. I strongly suggest avoiding the INFORMATION_SCHEMA views, as they are less complete as well extremely slow and tending...
July 11, 2014 at 4:34 pm
If possible, please attach the actual query plan xml as an xml file, rather than just a picture of the plan. There are row counts and other stats available...
July 11, 2014 at 11:41 am
fillfactor = 80 is rather low. What did you base that on?
July 11, 2014 at 11:38 am
sgmunson (7/10/2014)
July 10, 2014 at 4:09 pm
By far the biggest tuning pay back is to get the best clustering index on all tables, esp. large ones. Until you do that, the rest is honestly pretty...
July 10, 2014 at 3:28 pm
I must be missing something, because with the limited search criteria so far it looks straightforward. I can't tell whether they will pass in a single search id or...
July 10, 2014 at 3:25 pm
If you do many lookups by ManagerID, you'd likely be able to avoid messing with all this by clustering the table differently:
CREATE TABLE Employees (
ID INT...
July 10, 2014 at 3:09 pm
You should also be able to use a CROSS APPLY to a "SELECT TOP (1) ..." to get the most recent row for any given user.
July 10, 2014 at 2:51 pm
I want to be a successful DBA someday and hopefully can write sql scripts without looking or using BOL. 🙂
I've been a SQL Server DBA for 13+ years and I...
July 10, 2014 at 11:33 am
SELECT
COALESCE(t1.Account, t2.Account) AS Account,
MAX(Date) AS Date
FROM (
SELECT Account, MAX(Date) AS Date
FROM dbo.table1
...
July 10, 2014 at 11:30 am
Viewing 15 posts - 5,956 through 5,970 (of 7,608 total)