Understand how to select the best type of primary key from your table columns. Model your table data to avoid hot spots on data inserts.
- [Host] Okay, I've been talking about primary keys.…It's time to get into the detail.…Google tells us over and over in their documentation…that's it extremely important to pick the…correct columns for primary key.…First of all, there's certain aspects that aren't allowed.…Can't have a nullable and it can't be an array.…The second bullet point here is super important.…Google advises to avoid what's called hot spotting,…or focusing the data additions to a certain area…of a physical disk.…
And they recommend that you add a hash value to…an incrementing primary key.…This is really different than a lot of us are used…to in RDBMS.…We're really used to auto-incrementing GUIDS…and then we're kind of done with the story.…And this is so that the inserts can be randomized…across their globally scalable database and…not hot spotted.…Another important aspect before we jump off to look…at the documentation is that we can not change…the key columns after the initial table creation.…
So let's go ahead and look at their advice on schema…
- What is Cloud Spanner?
- Creating an instance and database using the console
- Making hot schema updates
- Cloud Spanner queries
- Loading data into Cloud Spanner
- Understanding transactions
- Cloud Spanner DevOps tools
- Auditing logs with Stackdriver
- Cost optimization
Skill Level Intermediate
Google Cloud Storage and Data Essential Trainingwith Joseph Lowery2h 54m Intermediate
Google Cloud Platform Essential Trainingwith Lynn Langit3h 56m Intermediate
1. Why Cloud Spanner?
2. Cloud Spanner Basics
3. Cloud Spanner Queries
4. Cloud Spanner DevOps
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.