मुख्य सामग्री पर जाएँ
Skillpedia
डेटाबेस22k · #10351

spanner-basics

यह क्या करती है

यह स्किल Cloud Spanner का इस्तेमाल सिखाती है, जो Google का वैश्विक रूप से consistent डेटाबेस है। यह उन टीमों के लिए है जिन्हें ऐसा डेटाबेस चाहिए जो कई क्षेत्रों में बढ़े और मज़बूत consistency दे।

कब इस्तेमाल करें

  • ✓जब आप Cloud Spanner इंस्टेंस या डेटाबेस बनाना चाहते हों।
  • ✓जब आपको ऐसा primary key या schema डिज़ाइन करना हो जो hotspots से बचे।
  • ✓जब Spanner queries या client कोड धीमे हों और उनकी जाँच करनी हो।

Skill का लिंक

https://github.com/google/skills/blob/main/skills/cloud/spanner-basics/SKILL.md

इसे कॉपी करके अपने AI (Claude, ChatGPT या Cursor) में पेस्ट करें और निर्देशों का पालन करने को कहें।

कैसे इस्तेमाल करें

सबसे आसान तरीका: मैसेज कॉपी करके अपने AI में पेस्ट करें। वह skill पढ़कर निर्देशों का पालन करेगा।

पेस्ट करने के लिए तैयार मैसेज

इस skill से मेरी मदद करो: https://github.com/google/skills/blob/main/skills/cloud/spanner-basics/SKILL.md इस लिंक की SKILL.md फ़ाइल पढ़ो और मेरे काम में उसके निर्देशों का पालन करो।
क्या आप चाहते हैं कि आपका AI ऐसी skills खुद ढूँढे?मुफ़्त Skillpedia MCP इंस्टॉल करें: बस एक लाइन, और हर काम से पहले यह 15,000+ skills में खोजता है।1 मिनट में इंस्टॉल करें →

AI से क्या माँगें: उदाहरण

“मेरे orders ऐप के लिए Cloud Spanner schema डिज़ाइन कीजिए, और किसी भी primary key के बारे में चेतावनी दीजिए जो hotspots बना सकती है।”

हर हफ़्ते 5 नई skills, 1 मिनट में पढ़ें।

यह कैसे काम करती है

यह बताती है कि इंस्टेंस और डेटाबेस कैसे सेट करें, और उन primary keys पर चेतावनी देती है जो क्रम में बढ़ती हैं और hotspots बना सकती हैं। किसी भी non-emulator डेटाबेस बदलाव से पहले यह मंज़ूरी माँगती है।

तकनीकी सामग्री (मूल SKILL.md)

लेखक का मूल टेक्स्ट, अंग्रेज़ी में, सीधे GitHub से।

Spanner Basics

This skill provides core workflows and guidance for administering and developing with Cloud Spanner on Google Cloud, a fully managed, mission-critical database service offering global transactional consistency and automatic, synchronous replication for high availability.

Attribution

MUST READ: Before executing any gcloud, REST API, or MCP command, you MUST read Usage Attribution. For commands executed directly in the terminal (never in generated scripts, Terraform, or user code), prefix gcloud with CLOUDSDK_METRICS_REQUEST_ATTRIBUTION="agent-skills/1.0 (skill:spanner-basics)" and append agent-skills/1.0 (skill:spanner-basics) to User-Agent headers.

Core Principles

  • Performance First: Spanner scales horizontally. Efficiency is tied to Primary Key design. Always warn against using monotonically increasing/decreasing values (like sequential timestamps) as the first part of a primary key to avoid hotspots.
  • Schema Design: Prefer interleaved tables for strongly related parent-child data that is frequently accessed together.

Safety

[!CAUTION] CRITICAL INSTRUCTION: You MUST obtain explicit user confirmation before making any non-emulator database changes (DML or DDL) or destructive operations (such as dropping tables, indexes, or any other Spanner resources). Do not execute them automatically; instead, output the command (e.g., gcloud spanner databases ddl update) and ask for explicit user approval. When database access is unavailable or authentication fails, do not block on trying to verify the existence of the instance, database, or table. Assume the provided resources exist and directly generate the DDL commands.

Common Workflows

Schema Evolution & DDL

  1. Use gcloud spanner databases ddl update to apply schema updates (such as CREATE, ALTER, or DROP tables and indexes).
  2. Reference schema-design.md for guidelines on primary key selection and interleaved tables.

Diagnosing Performance Issues

  1. Use SPANNER_SYS tables to identify slow or resource-intensive queries.
  2. For example, query SPANNER_SYS.QUERY_STATS_TOP_HOUR to find queries with the highest CPU usage.

Reference Directory

  • Core Concepts: Explanation of Spanner internals, architecture, and design.
  • CLI Usage: Essential gcloud spanner command-line operations for managing instances and databases.
  • IAM Security: Roles, permissions, and data governance best practices for Spanner.
  • Client Library Usage: Using Google Cloud client libraries for Spanner (Java, Go, Python, Node.js).
  • Terraform Usage: Infrastructure as Code examples for provisioning Spanner instances and databases.
  • MCP Usage: Using the Spanner remote MCP server.
  • PostgreSQL Dialect: Best practices and examples for using the PostgreSQL interface in Spanner.
  • Queues Usage: Cloud Spanner Queues: mental model, design constraints, and links related to transactional message queues.
  • Schema Design: Guidelines on primary key selection and interleaved tables for performance.

If you need product information that's not found in these references, use the search_documents tool of the Developer Knowledge MCP server.

अक्सर पूछे जाने वाले सवाल

क्या यह बिना पूछे मेरा live डेटाबेस बदल देगी?

नहीं। किसी भी DML या DDL बदलाव या विनाशकारी काम से पहले स्पष्ट पुष्टि चाहिए।

Spanner में hotspot क्या है?

ऐसा पैटर्न जिसमें बहुत सारे writes key range के एक ही हिस्से पर पहुँचते हैं, जो अक्सर क्रमिक primary keys से होता है।

क्या यह parent-child table layout सपोर्ट करती है?

हाँ। जिन संबंधित डेटा को अक्सर साथ पढ़ा जाता है, उनके लिए यह interleaved tables सुझाती है।

जानकारी

लेखक का मूल विवरण

Assists in provisioning instances and databases, designing performant schemas, and querying data in Cloud Spanner on Google Cloud. Use when designing primary keys, writing SQL queries or client library code, or diagnosing performance issues.

repo: google/skills

लोकप्रियता

GitHub स्टार
22k
रैंकिंग में स्थान
#10351
लाइसेंस
Apache-2.0
अपडेट की गई
2/11/2026

क्या यह skill काम की है?

0

लॉग इन करें वोट करने के लिए।

कमेंट

  • …

इस repository की और skills

finding-google-skills

22k

आपके एजेंट को किसी सेटअप काम के लिए सही Google गाइड खोजने में मदद करती है, जैसे hosting, databases, storage, sign-in या AI model serving।

AI और एजेंटएजेंट

gcloud

22k

यह आपके एजेंट को Google Cloud gcloud कमांड लिखने और जाँचने में मदद करती है, कुछ भी चलाने से पहले सटीक सिंटैक्स देखकर, ताकि फ़्लैग का अंदाज़ा न लगे।

कोडिंगडिप्लॉय और क्लाउड (DevOps)

google-cloud-recipe-auth

22k

आपके एजेंट को Google Cloud की पहचान और पहुँच समझाती है, जिसमें यह शामिल है कि लोग और सेवाएँ कैसे साइन इन करते हैं और उन्हें कौन सी अनुमतियाँ मिलती हैं।

कोडिंगसिक्योरिटी

google-cloud-recipe-onboarding

22k

एक नए डेवलपर को Google Cloud पर पहले कदमों में मदद करती है, जिसमें प्रोजेक्ट चुनना, बिलिंग जोड़ना और पहला संसाधन डिप्लॉय करना शामिल है।

कोडिंगडिप्लॉय और क्लाउड (DevOps)

मिलती-जुलती skills