Viewing 15 posts - 2,521 through 2,535 (of 5,841 total)
I would have nonclustered indexes on the requisite fields required to find the aged records (some date field on all parent tables I would presume). Child tables would need...
Best,
Kevin G. Boles
SQL Server Consultant
SQL MVP 2007-2012
TheSQLGuru on googles mail service
June 25, 2013 at 1:37 pm
On Win2K8+, you have to create a volume that is >=4GB for it to be sector aligned on 1024K. What most don't realize is that most servers ship with...
Best,
Kevin G. Boles
SQL Server Consultant
SQL MVP 2007-2012
TheSQLGuru on googles mail service
June 25, 2013 at 1:34 pm
I cannot give you the details you seek, but can provide the following input/responses:
1) The server's IO is clearly not up to the task. RAID1 indicates just TWO spindles...
Best,
Kevin G. Boles
SQL Server Consultant
SQL MVP 2007-2012
TheSQLGuru on googles mail service
June 25, 2013 at 9:09 am
Jeff Moden (6/23/2013)
TheSQLGuru (6/23/2013)
I got to stand on the shoulders of a TSQL Giant (hey Jeff!)! 🙂
So that's what it was... I had a giant standing on my shoulders. 🙂
No...
Best,
Kevin G. Boles
SQL Server Consultant
SQL MVP 2007-2012
TheSQLGuru on googles mail service
June 24, 2013 at 9:50 am
mcertini (6/22/2013)
Kevin,Awsome! Thank you for the solution.
Mike
Glad I could help! I got to stand on the shoulders of a TSQL Giant (hey Jeff!)! 🙂
BTW, please do use the numeric...
Best,
Kevin G. Boles
SQL Server Consultant
SQL MVP 2007-2012
TheSQLGuru on googles mail service
June 23, 2013 at 8:55 am
Does this do the trick?
;WITH
cteSimplifyDateTime AS
(
SELECT DT = CAST(Year+Month+Day+' '+Hour+':'+Minute+':'+Second+'.'+Milisecond AS DATETIME), curItem
FROM #mytable
),
cteEnumerateGroups AS
(
SELECT DT, curItem, MyGroup = ROW_NUMBER() OVER (ORDER BY DT, curItem)-
ROW_NUMBER() OVER (PARTITION BY curItem...
Best,
Kevin G. Boles
SQL Server Consultant
SQL MVP 2007-2012
TheSQLGuru on googles mail service
June 22, 2013 at 12:59 pm
Jeff, his first post with actual data in it had a "Concat" field, which seems to be a bit numeric with all the date-time values strung together. I think...
Best,
Kevin G. Boles
SQL Server Consultant
SQL MVP 2007-2012
TheSQLGuru on googles mail service
June 22, 2013 at 10:09 am
mcertini (6/21/2013)
Best,
Kevin G. Boles
SQL Server Consultant
SQL MVP 2007-2012
TheSQLGuru on googles mail service
June 21, 2013 at 10:44 am
Seems like further clarification of the needs is required. Should "chained" intersections be allowed/considered as one group? Or discarded.
I also note that the cursor version for your data...
Best,
Kevin G. Boles
SQL Server Consultant
SQL MVP 2007-2012
TheSQLGuru on googles mail service
June 19, 2013 at 10:47 am
tssopa (6/19/2013)
TheSQLGuru (6/18/2013)
This solution was pretty quick to slap together and seems to do the trick, although I must admit to feeling slightly dirty posting it! :hehe:
Thanks Kevin. ...
Best,
Kevin G. Boles
SQL Server Consultant
SQL MVP 2007-2012
TheSQLGuru on googles mail service
June 19, 2013 at 7:43 am
tssopa (6/19/2013)
Best,
Kevin G. Boles
SQL Server Consultant
SQL MVP 2007-2012
TheSQLGuru on googles mail service
June 19, 2013 at 7:40 am
ALWAYS is a bit strong.
We will have to agree to disagree. I'm sticking with my statement.
SQL devs should know this stuff.
But they don't. Or they are in...
Best,
Kevin G. Boles
SQL Server Consultant
SQL MVP 2007-2012
TheSQLGuru on googles mail service
June 19, 2013 at 7:37 am
This solution was pretty quick to slap together and seems to do the trick, although I must admit to feeling slightly dirty posting it! :hehe:
SET NOCOUNT ON
CREATE TABLE dbo.#out...
Best,
Kevin G. Boles
SQL Server Consultant
SQL MVP 2007-2012
TheSQLGuru on googles mail service
June 18, 2013 at 9:16 pm
ericjorg (6/18/2013)
Best,
Kevin G. Boles
SQL Server Consultant
SQL MVP 2007-2012
TheSQLGuru on googles mail service
June 18, 2013 at 8:48 pm
Why read the persons table three times when you only have to read it once?
I have seen this type of query SOOO many times at clients over the years....
Best,
Kevin G. Boles
SQL Server Consultant
SQL MVP 2007-2012
TheSQLGuru on googles mail service
June 17, 2013 at 8:44 am
Viewing 15 posts - 2,521 through 2,535 (of 5,841 total)