Forum Replies Created

Viewing 15 posts - 196 through 210 (of 432 total)

  • RE: What is the Point in Updating the PK in an UPDATE Stamenet

    YSLGuru (6/30/2010)


    With the above table as the example, why the heck would someone construct an update statement like this? It just doesn;t make any sense to me to include...

  • RE: order of rows during bulk insert

    sjimmo (6/25/2010)


    BTW, you can see everything I have demonstrated and said by running showplans against each query

    See attached.

  • RE: order of rows during bulk insert

    When there is a clustered index, then the select will do a index scan on the clustered index and return the records in the order that it finds them based...

  • RE: order of rows during bulk insert

    sjimmo (6/25/2010)


    Not on a simple select *

    Are you saying that the IAM page chain will not be used to do an unordered page traversal if you specify a "simple select...

  • RE: order of rows during bulk insert

    I should have said "If there is a clustered index on the table it will return the data in the order of the clustered index"

    That's not always true however. Just...

  • RE: order of rows during bulk insert

    sjimmo (6/25/2010)


    The original comment was about records being loaded using bcp into a table with no PK or other indexing, and adding it after. (This was my original comment...

  • RE: order of rows during bulk insert

    But I've already shown you an example where the order of the SELECT statement without ORDER BY does not match the clustered index order and you say that you get...

  • RE: order of rows during bulk insert

    My collation is Latin1_General_CI_AS. But if it was ordered by the clustered index then that would be irrelevant because the cluster key in my example is an INTEGER. The ordering...

  • RE: order of rows during bulk insert

    The idea that SELECT without ORDER BY returns the clustered index order has been debunked many, many times at SQLServerCentral and elsewhere. Just Google for those references. It's not difficult...

  • RE: order of rows during bulk insert

    sjimmo (6/23/2010)


    Nick,

    When you issue a select * from tablename on a table without a PK or clustered index, the data should be returned in the order that it appears in...

  • RE: Using an Int to store a date

    Correct. DATETIME is no more immune to different calendar problems than INT is. Calendar changes aren't necessarily a problem. You may not even need to do date arithmetic and even...

  • RE: DB Design/Many to Many relationships

    In the relational model all relationships can be represented in only one way: in tables. So a table called T with columns X and Y indicates that there is a...

  • RE: Using an Int to store a date

    As already stated a DATE column ought to be a better choice for SQL Server 2008 onwards.

    However, there is at least one situation in previous versions where it could make...

  • RE: Setting up the Primary Key

    Steve Jones - Editor (6/15/2010)


    I can see a GUID clustered if it's built on NewSequentialID() only.

    You could still get page splits because NEWSEQUENTIALID may be generated out of sequence after...

  • RE: Setting up the Primary Key

    Jeff Moden (6/13/2010)


    Heh... that's precisely why I usually don't try to have a conversation with you. You just don't need to get so bloody sarcastic all the time. ...

Viewing 15 posts - 196 through 210 (of 432 total)