{"id":4795,"date":"2020-04-19T18:26:35","date_gmt":"2020-04-19T18:26:35","guid":{"rendered":"https:\/\/www.testpreptraining.com\/tutorial\/?page_id=4795"},"modified":"2020-04-19T18:26:35","modified_gmt":"2020-04-19T18:26:35","slug":"cloud-spanner-instances-google-professional-data-engineer-gcp","status":"publish","type":"page","link":"https:\/\/www.testpreptraining.ai\/tutorial\/cloud-spanner-instances-google-professional-data-engineer-gcp\/","title":{"rendered":"Cloud Spanner Instances Google Professional Data Engineer GCP"},"content":{"rendered":"<ul>\n<li>To use Cloud Spanner, first create a Cloud Spanner instance within Google Cloud project.<\/li>\n<li>instance allocates resources used by Cloud Spanner<\/li>\n<li>Instance creation includes instance configuration and the node count<\/li>\n<li>An instance configuration defines the geographic placement and replication of the databases in that instance.<\/li>\n<li>node count is the number of nodes to allocate to that instance.<\/li>\n<li>Each node provides up to 2 TB of storage.<\/li>\n<li>After instance creation, can add or remove nodes to the instance later.<\/li>\n<li>cannot remove nodes if\n<ul>\n<li>If store more than 2 TB of data per node.<\/li>\n<li>Spanner has created a large number of splits for instance&#8217;s data<\/li>\n<\/ul>\n<\/li>\n<li>To change nodes, use\n<ul>\n<li>Cloud Consol<\/li>\n<li>the gcloud command-line tool<\/li>\n<li>the client libraries<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<p><strong>Nodes versus replicas<\/strong><\/p>\n<ul>\n<li>To scale up the serving and storage resources in instance, add more nodes to that instance.<\/li>\n<li>Adding a node does not increase the number of replicas but increases the resources<\/li>\n<li>total number of servers in a Cloud Spanner instance is the number of nodes the instance has multiplied by the number of replicas in the instance.<\/li>\n<\/ul>\n<p><strong>Data Management<\/strong><\/p>\n<ul>\n<li>To create, alter, and delete tables and indexes is done by using the default Database editor<\/li>\n<li>Use Cloud Console for inserting, editing, and deleting data.<\/li>\n<li>run DML statements using client libraries, the Google Cloud Console, and the gcloud command-line tool.<\/li>\n<li>execute DML statements inside read-write transactions.<\/li>\n<li>During data read, shared read locks is acquired on limited portions of the row ranges to read.<\/li>\n<li>During write using DML statements, exclusive locks is acquired<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<ul>\n<li>Cloud Spanner sequentially executes all the SQL statements (SELECT, INSERT, UPDATE, and DELETE) within a transaction and not concurrently except multiple SELECT statements<\/li>\n<li>transaction with DML statements has the same limits as any other transaction.<\/li>\n<li>Use Partitioned DML for large-scale changes<\/li>\n<li>If transaction result in more than 20,000 mutations, a BadUsage error is given<\/li>\n<li>If a transaction result larger than 100 MB, a BadUsage error is given<\/li>\n<li>Partitioned DML is designed for bulk updates and deletes, particularly periodic cleanup and backfilling.<\/li>\n<\/ul>\n<p><strong>Query<\/strong><\/p>\n<ul>\n<li>DQL statements is used to query<\/li>\n<li>A query execution plan is the set of steps for how the results are obtained.<\/li>\n<li>can retrieve a query plan using the Cloud Console, the client libraries, and the gcloud command-line tool.<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<h3>Query Best Practices<\/h3>\n<ul>\n<li>Use query parameters to speed up frequently executed queries<\/li>\n<li>Use secondary indexes to speed up common queries<\/li>\n<li>Avoid large reads inside read-write transactions<\/li>\n<li>Use ORDER BY to ensure the ordering of SQL results<\/li>\n<li>Use STARTS_WITH instead of LIKE to speed up parameterized SQL queries<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>To use Cloud Spanner, first create a Cloud Spanner instance within Google Cloud project. instance allocates resources used by Cloud Spanner Instance creation includes instance configuration and the node count An instance configuration defines the geographic placement and replication of the databases in that instance. node count is the number of nodes to allocate to&#8230;<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_acf_changed":false,"footnotes":""},"categories":[617],"tags":[684,688,619,623,622,618,621],"class_list":["post-4795","page","type-page","status-publish","hentry","category-google-gcp","tag-cloud-spanner","tag-cloud-spanner-instances","tag-data-engineer","tag-gcp","tag-google-certification","tag-google-cloud","tag-professional-data-engineer"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v22.1 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Cloud Spanner Instances Google Professional Data Engineer GCP - Testprep Training Tutorials<\/title>\n<meta name=\"description\" content=\"Google Cloud Certified Professional Data Engineer Tutorial, dumps, brief notes on Cloud Spanner Instances\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.testpreptraining.ai\/tutorial\/cloud-spanner-instances-google-professional-data-engineer-gcp\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Cloud Spanner Instances Google Professional Data Engineer GCP - Testprep Training Tutorials\" \/>\n<meta property=\"og:description\" content=\"Google Cloud Certified Professional Data Engineer Tutorial, dumps, brief notes on Cloud Spanner Instances\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.testpreptraining.ai\/tutorial\/cloud-spanner-instances-google-professional-data-engineer-gcp\/\" \/>\n<meta property=\"og:site_name\" content=\"Testprep Training Tutorials\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data1\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.testpreptraining.ai\/tutorial\/cloud-spanner-instances-google-professional-data-engineer-gcp\/\",\"url\":\"https:\/\/www.testpreptraining.ai\/tutorial\/cloud-spanner-instances-google-professional-data-engineer-gcp\/\",\"name\":\"Cloud Spanner Instances Google Professional Data Engineer GCP - Testprep Training Tutorials\",\"isPartOf\":{\"@id\":\"https:\/\/www.testpreptraining.ai\/tutorial\/#website\"},\"datePublished\":\"2020-04-19T18:26:35+00:00\",\"dateModified\":\"2020-04-19T18:26:35+00:00\",\"description\":\"Google Cloud Certified Professional Data Engineer Tutorial, dumps, brief notes on Cloud Spanner Instances\",\"breadcrumb\":{\"@id\":\"https:\/\/www.testpreptraining.ai\/tutorial\/cloud-spanner-instances-google-professional-data-engineer-gcp\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.testpreptraining.ai\/tutorial\/cloud-spanner-instances-google-professional-data-engineer-gcp\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.testpreptraining.ai\/tutorial\/cloud-spanner-instances-google-professional-data-engineer-gcp\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.testpreptraining.ai\/tutorial\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Cloud Spanner Instances Google Professional Data Engineer GCP\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.testpreptraining.ai\/tutorial\/#website\",\"url\":\"https:\/\/www.testpreptraining.ai\/tutorial\/\",\"name\":\"Testprep Training Tutorials\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\/\/www.testpreptraining.ai\/tutorial\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.testpreptraining.ai\/tutorial\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.testpreptraining.ai\/tutorial\/#organization\",\"name\":\"Testprep Training\",\"url\":\"https:\/\/www.testpreptraining.ai\/tutorial\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.testpreptraining.ai\/tutorial\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/www.testpreptraining.com\/tutorial\/wp-content\/uploads\/2020\/07\/tpt-logo-6.png\",\"contentUrl\":\"https:\/\/www.testpreptraining.com\/tutorial\/wp-content\/uploads\/2020\/07\/tpt-logo-6.png\",\"width\":583,\"height\":153,\"caption\":\"Testprep Training\"},\"image\":{\"@id\":\"https:\/\/www.testpreptraining.ai\/tutorial\/#\/schema\/logo\/image\/\"}}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Cloud Spanner Instances Google Professional Data Engineer GCP - Testprep Training Tutorials","description":"Google Cloud Certified Professional Data Engineer Tutorial, dumps, brief notes on Cloud Spanner Instances","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.testpreptraining.ai\/tutorial\/cloud-spanner-instances-google-professional-data-engineer-gcp\/","og_locale":"en_US","og_type":"article","og_title":"Cloud Spanner Instances Google Professional Data Engineer GCP - Testprep Training Tutorials","og_description":"Google Cloud Certified Professional Data Engineer Tutorial, dumps, brief notes on Cloud Spanner Instances","og_url":"https:\/\/www.testpreptraining.ai\/tutorial\/cloud-spanner-instances-google-professional-data-engineer-gcp\/","og_site_name":"Testprep Training Tutorials","twitter_card":"summary_large_image","twitter_misc":{"Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.testpreptraining.ai\/tutorial\/cloud-spanner-instances-google-professional-data-engineer-gcp\/","url":"https:\/\/www.testpreptraining.ai\/tutorial\/cloud-spanner-instances-google-professional-data-engineer-gcp\/","name":"Cloud Spanner Instances Google Professional Data Engineer GCP - Testprep Training Tutorials","isPartOf":{"@id":"https:\/\/www.testpreptraining.ai\/tutorial\/#website"},"datePublished":"2020-04-19T18:26:35+00:00","dateModified":"2020-04-19T18:26:35+00:00","description":"Google Cloud Certified Professional Data Engineer Tutorial, dumps, brief notes on Cloud Spanner Instances","breadcrumb":{"@id":"https:\/\/www.testpreptraining.ai\/tutorial\/cloud-spanner-instances-google-professional-data-engineer-gcp\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.testpreptraining.ai\/tutorial\/cloud-spanner-instances-google-professional-data-engineer-gcp\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.testpreptraining.ai\/tutorial\/cloud-spanner-instances-google-professional-data-engineer-gcp\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.testpreptraining.ai\/tutorial\/"},{"@type":"ListItem","position":2,"name":"Cloud Spanner Instances Google Professional Data Engineer GCP"}]},{"@type":"WebSite","@id":"https:\/\/www.testpreptraining.ai\/tutorial\/#website","url":"https:\/\/www.testpreptraining.ai\/tutorial\/","name":"Testprep Training Tutorials","description":"","publisher":{"@id":"https:\/\/www.testpreptraining.ai\/tutorial\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.testpreptraining.ai\/tutorial\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.testpreptraining.ai\/tutorial\/#organization","name":"Testprep Training","url":"https:\/\/www.testpreptraining.ai\/tutorial\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.testpreptraining.ai\/tutorial\/#\/schema\/logo\/image\/","url":"https:\/\/www.testpreptraining.com\/tutorial\/wp-content\/uploads\/2020\/07\/tpt-logo-6.png","contentUrl":"https:\/\/www.testpreptraining.com\/tutorial\/wp-content\/uploads\/2020\/07\/tpt-logo-6.png","width":583,"height":153,"caption":"Testprep Training"},"image":{"@id":"https:\/\/www.testpreptraining.ai\/tutorial\/#\/schema\/logo\/image\/"}}]}},"_links":{"self":[{"href":"https:\/\/www.testpreptraining.ai\/tutorial\/wp-json\/wp\/v2\/pages\/4795","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.testpreptraining.ai\/tutorial\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/www.testpreptraining.ai\/tutorial\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/www.testpreptraining.ai\/tutorial\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.testpreptraining.ai\/tutorial\/wp-json\/wp\/v2\/comments?post=4795"}],"version-history":[{"count":1,"href":"https:\/\/www.testpreptraining.ai\/tutorial\/wp-json\/wp\/v2\/pages\/4795\/revisions"}],"predecessor-version":[{"id":4805,"href":"https:\/\/www.testpreptraining.ai\/tutorial\/wp-json\/wp\/v2\/pages\/4795\/revisions\/4805"}],"wp:attachment":[{"href":"https:\/\/www.testpreptraining.ai\/tutorial\/wp-json\/wp\/v2\/media?parent=4795"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.testpreptraining.ai\/tutorial\/wp-json\/wp\/v2\/categories?post=4795"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.testpreptraining.ai\/tutorial\/wp-json\/wp\/v2\/tags?post=4795"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}