Viewing 15 posts - 5,341 through 5,355 (of 7,614 total)
Jeff Moden (2/27/2015)
ScottPletcher (2/27/2015)
Your clustered index key(s) doesn't(don't) have to be unique by itself(themselves); SQL will take care of that if it needs to.
... at possibly quite some cost if...
February 27, 2015 at 3:02 pm
You can also use CROSS APPLY to do that:
select VC.COLUMN_NAME,
case when
ROW_NUMBER () OVER (
partition by C.COLUMN_NAME order by
CHARINDEX(',',VIEW_DEFINITION,CHARINDEX(C.COLUMN_NAME,VIEW_DEFINITION))-
CHARINDEX(VC.COLUMN_NAME,VIEW_DEFINITION)
) = 1
then 1
else 0 end
as lenDiff
,alias
,CHARINDEX(',',VIEW_DEFINITION,CHARINDEX(C.COLUMN_NAME,VIEW_DEFINITION)) diff1
...
February 27, 2015 at 2:24 pm
D'OH!
Here's my script, based on Books Online's description of how to calc max row size. I think it will give you a reasonably good estimate of the max possible...
February 27, 2015 at 2:12 pm
Yep. To me, the RAM restrictions and the lack of data compression are the big factors in Standard Edition. Snapshots not being available isn't that bad, although it...
February 27, 2015 at 1:59 pm
Just let SQL tell you :-).
Create an empty table and then run this command on it:
SELECT *
FROM sys.dm_db_index_physical_stats(DB_ID(),OBJECT_ID('<your_table_name>'),NULL,NULL,'DETAILED')
It will give you the min and max row sizes.
February 27, 2015 at 1:52 pm
djj (2/27/2015)
February 27, 2015 at 1:20 pm
Eric M Russell (2/27/2015)
February 27, 2015 at 1:16 pm
Before making such a critical choice, review SQL's missing index and index usage stats. Odds are, you have a better choice than an identity column for the clustering index...
February 27, 2015 at 12:50 pm
Eric M Russell (2/27/2015)
N_Muller (2/26/2015)
...
To note is the fact that the table(s) will have millions of rows, but the customer will request data for at at most, 100 or so...
February 27, 2015 at 12:47 pm
Eric M Russell (2/27/2015)
ScottPletcher (2/27/2015)
A lower FILLFACTOR might be required. Since users always provide the up-to-50-byte key, the idea is to avoid having to create nonclustered indexes. This...
February 27, 2015 at 12:45 pm
Jeff Moden (2/27/2015)
ScottPletcher (2/27/2015)
Eric M Russell (2/27/2015)
February 27, 2015 at 11:44 am
Eric M Russell (2/27/2015)
February 27, 2015 at 11:19 am
Lynn Pettis (2/27/2015)
ScottPletcher (2/27/2015)
Lynn Pettis (2/26/2015)
ScottPletcher (2/26/2015)
February 27, 2015 at 10:46 am
Lynn Pettis (2/26/2015)
ScottPletcher (2/26/2015)
February 27, 2015 at 9:25 am
Depending on the specifics, it might be less overhead to save what you need from the summary tables, truncate them, then do a bulk insert of everything back to them...
February 26, 2015 at 2:33 pm
Viewing 15 posts - 5,341 through 5,355 (of 7,614 total)