Viewing 15 posts - 7,471 through 7,485 (of 7,608 total)
When did SQL Server start doing these "auto sorts" for clus indexes?
February 16, 2012 at 8:12 am
I wouldn't call it 'auto-magically',
That's primarily what I meant. I thought it was conditional. I've seen SQL not do it.
To me it's much safer to code your...
February 15, 2012 at 4:33 pm
I thought it depended on whether SQL thought it was "necessary" or not.
Whether the number of rows, etc., met whatever magic criteria SQL went by -- which are not documented...
February 15, 2012 at 12:52 pm
IIRC, a single insert of many rows will be done in the clustered index order auto-magically.
Really? Interesting. I don't recall that. Would be nice tho.
February 15, 2012 at 12:35 pm
I think the order does matter for the clus index and whether it gets fragmented or not. SQL is coded to recognize sequential inserts and not cause page splits...
February 15, 2012 at 7:52 am
Very interesting post by Conor.
I referred to the clus index only. I assumed you can't control any other index(es), nor a heap (the ORDER BY would be irrelevant to...
February 14, 2012 at 1:46 pm
It just seems to be too much work when you still need to retrieve results in some order. If you don't then who cares?
You should care when inserting into...
February 14, 2012 at 1:11 pm
Be careful with phrasing: MSDN doesn't say it doesn't work, they say it's not guaranteed to work.
February 14, 2012 at 1:08 pm
When used together with a SELECT...INTO statement to insert rows from another source, ...
I take that to mean what it explicitly says -- if you do SELECT ... INTO <new_table>,...
February 14, 2012 at 12:07 pm
You did give SQL this instruction when creating the trigger:
WITH EXECUTE AS 'DOMAIN\AnonLogin'
Maybe you can use ORIGINAL_LOGIN( ) to still get the actual original login name.
February 14, 2012 at 11:59 am
Seconded -- the Developer Edition of SQL is great for learning -- and cheap!
For SQL Server knowledge, check out "Inside SQL Books" by/with Kalen Delaney.
For T-SQL, check out books by...
January 17, 2012 at 1:14 pm
On the really large tables, looks like you are using LID, varchar(100), to join / match on them.
Is there an index on LID on the large tables? If so,...
January 11, 2012 at 2:39 pm
Running SELECT * FROM test.dbo.sysfiles I got the following
To be safe, you really should run against test.sys.database_files, since that is what SQL is actually looking at ... notice...
January 10, 2012 at 2:48 pm
Given that this is SQL 2008 (or SQL 2005 at least), you mean:
SELECT *
FROM test.sys.database_files
right? 🙂
January 10, 2012 at 2:22 pm
Ok.
See what is in the sys.master_files "table" for that db:
SELECT *
FROM sys.master_files
WHERE
database_id = DB_ID(N'test')
January 10, 2012 at 2:19 pm
Viewing 15 posts - 7,471 through 7,485 (of 7,608 total)