Viewing 15 posts - 21,556 through 21,570 (of 49,552 total)
A datetime is 8 bytes, that's the same as a bigint, twice the width of an integer. That's not wide. Multi-column clustered indexes are generally not a good idea, that's...
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
December 23, 2011 at 8:33 am
Sort in tempdb, online, maxdop and drop_existing are just options for how that index rebuild will be done, they don't affect any future rebuilds or have any effect on the...
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
December 23, 2011 at 8:09 am
Dev (12/23/2011)
You may be right but I hesitate to include datetime columns in Clustered Index.
Then you're ignoring one of the best clustered index options there is
Queries are based...
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
December 23, 2011 at 8:02 am
dfrome (12/23/2011)
I'm pretty sure I need to have datetime in "some" index
You do, yes. Otherwise you'll get secondary filters and that's not optimal. (or, if it's a nonclustered index, key...
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
December 23, 2011 at 8:00 am
Dev (12/23/2011)
I don’t think it adds any value for your queries but it may cause fragmentations with the data load frequency you mentioned.
Errr, no.
It is needed for his...
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
December 23, 2011 at 7:44 am
The order of the index causes the reads to increase because SQL can no longer seek optimally. SQL can only seek on left-based subsets of the index key, but as...
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
December 23, 2011 at 7:41 am
Don't have enough info on the requirements to answer that one.
What I might do with something like this (again, might, we don't have the info to make hard decisions) is...
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
December 23, 2011 at 6:29 am
Hmm... That reminds me....
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
December 23, 2011 at 5:08 am
Have you checked the script library here or a google search? There should be something to get you started. It's not trivial though.
One question though. Why are you...
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
December 23, 2011 at 5:02 am
Grant Fritchey (12/23/2011)
I've been on vaca this week and I'll be on it next week.
Nice. I'm supposed to be working today, but meh... I'll keep til next week, or even...
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
December 23, 2011 at 4:52 am
Grant Fritchey (12/23/2011)
Merry Christmas, Happy Yule, Happy Hannukah, Happy New Year, Joyous Kwanzaa, Profitable Festivus, Yippee Kai Yay Mother ..., and all the rest!
Hey, long time no see (here)
Same to...
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
December 23, 2011 at 4:19 am
dilipd006 (12/23/2011)
I decided to go for seperate tables, as it would be easy to maintain.
Easier to maintain maybe, probably easier to query, likely better performance and far less chance of...
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
December 23, 2011 at 4:03 am
Also note that you don't have to drop all indexes. You have to drop all indexes and constraints (primary, unique, foreign, check) that are on any of the string columns...
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
December 23, 2011 at 4:01 am
Please in future post the actual table definition. A list of columns can't be copy-pasted to management studio and run.
This should do what you want, assuming you don't have duplicate...
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
December 23, 2011 at 3:56 am
Then see the links that Salum posted
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
December 23, 2011 at 2:17 am
Viewing 15 posts - 21,556 through 21,570 (of 49,552 total)