Sunday, February 15, 2015

last of the Murder They Wrote notes

Alright, what is here goes with what is here, here, and here. An edge case for using a table variable is for putting errors that happen midstream in a transaction into the table variable and then returning the table variable, declared before the transaction ever begins, allowing for what went wrong in a transaction to see the light of day instead of just being something lost forever as part of the rollback. You may use COLLATE following an ORDER BY like so: COLLATE Traditional_Spanish_ci_ai ...to specify a culture. Someone in the audience said that these tend to show up in third party applications and the Wayne Sheffield suggested that these moreover tend to create a performance hit. The better way to specify a culture is to set it globally at your server if you can help it. I got an earful about how the ORM convention of using GUIDs for record identifiers is really poor practice. They too come with a performance hit. bigint types ultimately have more of a range than uniqueidentifier (GUID) types too because parts of a GUID are not random but are instead reserved for an encoding of a representation of the latest moment in time or something similar. There are five variations of uniqueidentifier which vary based on what the extra, not random, bonus content is:

  1. TimeStamp + MAC Address
  2. Version 1 w/ DCE Security
  3. Name with MD5 hash
  4. Random / Pseudo-Random Number Generation
  5. Name with SHA-1 hash

NHibernate will attempt to update NULL columns at the database if the dance partner for the column at the map does not specify the nullable quality. When running with NOLOCK in, for example, SELECT * FROM Foo WITH(NOLOCK) you will read as READ UNCOMMITTED meaning you may read records halfway through a transaction that is midstream that is going to ultimately get rolled back, removing the records. PeopleSoft was written for Oracle which is better with cursors than set-based stuff and it plays to this strength. It thus runs with problems on MSSQL where the cursors versus set-based standing is reversed.

No comments:

Post a Comment