Hash value generation times

  • I have a table with 56 million rows. I performed the following operation:

    ALTER TABLE MyBigTable ADD NewHashColumn AS HASHBYTES('SHA2_512', Column1+Column2+Column3)

    The operation took a fraction of a second to complete. How is this possioble?! I mean can SQL Server really generate so many hash keys in such space of time?!

    I'm guessing that the table was already in memory and all this operation took place in memory? Will the next checkpoint write the actual hash codes to the disk?

    ---------------------------------------------------------

    It takes a minimal capacity for rational thought to see that the corporate 'free press' is a structurally irrational and biased, and extremely violent, system of elite propaganda.
    David Edwards - Media lens[/url]

    Society has varying and conflicting interests; what is called objectivity is the disguise of one of these interests - that of neutrality. But neutrality is a fiction in an unneutral world. There are victims, there are executioners, and there are bystanders... and the 'objectivity' of the bystander calls for inaction while other heads fall.
    Howard Zinn

  • If I were to guess from my limited knowledge of Hashbytes that this is treated like a computed column and doesn't actually store anything, only returning a value on select.

  • That makes perfect sense. Thanks for the clarification.

    ---------------------------------------------------------

    It takes a minimal capacity for rational thought to see that the corporate 'free press' is a structurally irrational and biased, and extremely violent, system of elite propaganda.
    David Edwards - Media lens[/url]

    Society has varying and conflicting interests; what is called objectivity is the disguise of one of these interests - that of neutrality. But neutrality is a fiction in an unneutral world. There are victims, there are executioners, and there are bystanders... and the 'objectivity' of the bystander calls for inaction while other heads fall.
    Howard Zinn

  • If you had added PERSISTED when adding the computed column there is a possibility you might still be waiting for that complete 🙂

    There are no special teachers of virtue, because virtue is taught by the whole community.
    --Plato

Viewing 4 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply