Forum Replies Created

Viewing 15 posts - 7,471 through 7,485 (of 7,608 total)

  • RE: Order by While inserting

    When did SQL Server start doing these "auto sorts" for clus indexes?

  • RE: Order by While inserting

    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...

  • RE: Order by While inserting

    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...

  • RE: Order by While inserting

    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.

  • RE: Order by While inserting

    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...

  • RE: Order by While inserting

    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...

  • RE: Order by While inserting

    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...

  • RE: Order by While inserting

    Be careful with phrasing: MSDN doesn't say it doesn't work, they say it's not guaranteed to work.

  • RE: Order by While inserting

    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>,...

  • RE: Logon trigger malfunctions

    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.

  • RE: New and looking to advance my career

    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...

  • RE: Update takes too long and freezes the server

    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,...

  • RE: Unable to shrink transaction log - could not locate files

    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...

  • RE: Unable to shrink transaction log - could not locate files

    Given that this is SQL 2008 (or SQL 2005 at least), you mean:

    SELECT *

    FROM test.sys.database_files

    right? 🙂

  • RE: Unable to shrink transaction log - could not locate files

    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')

Viewing 15 posts - 7,471 through 7,485 (of 7,608 total)