본문으로 건너뛰기
Skillpedia
데이터베이스22k · #10229

bigquery-optimization

하는 일

이 스킬은 BigQuery 지출을 줄이고 더 빠르게 실행되도록 돕습니다. BigQuery 요금, 테이블, 예약을 관리하는 사람을 위한 스킬입니다.

사용하는 경우

  • ✓BigQuery 요금을 낮추고 싶거나 돈이 어디에 쓰이는지 찾고 싶을 때.
  • ✓BigQuery 에디션이나 예약 규모를 바꿀지 결정해야 할 때.
  • ✓큰 BigQuery 테이블에 파티셔닝이나 클러스터링을 추가하고 싶을 때.

스킬 링크

https://github.com/google/skills/blob/main/skills/cloud/bigquery-optimization/SKILL.md

복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.

사용 방법

가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.

바로 붙여넣을 수 있는 메시지

Use this skill to help me: https://github.com/google/skills/blob/main/skills/cloud/bigquery-optimization/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
AI가 이런 스킬을 알아서 찾아 쓰길 원하시나요?무료 Skillpedia MCP를 설치하세요. 한 줄이면 작업마다 스킬 15,000+개 중에서 검색합니다.1분 만에 설치 →

AI에게 요청하는 예시

“BigQuery 요금이 많이 늘었어요. 비용이 큰 테이블과 쿼리를 찾고 비용을 낮추는 방법을 제안해 주세요.”

매주 새 스킬 5개. 읽는 데 1분.

작동 방식

테이블, 저장소, 쿼리를 비용과 속도 측면에서 분석한 다음, 파티셔닝, 클러스터링, 더 나은 저장 모델 등을 제안합니다. 각 변경안을 설명하므로 적용 여부를 직접 정할 수 있습니다.

기술 내용 (원본 SKILL.md)

작성자의 영어 원문을 GitHub에서 그대로 가져왔습니다.

BigQuery Optimization Workflow

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:bigquery-optimization)" and append agent-skills/1.0 (skill:bigquery-optimization) to User-Agent headers.

Prerequisites & Environment Setup

Before executing optimization analyses, evaluating editions, or applying DDL modifications:

  1. Google Cloud SDK: Ensure the Google Cloud SDK is installed and configured.

  2. Project Selection: Set the active Google Cloud project:

    gcloud config set project {project_id}
    
  3. API Enablement: Ensure BigQuery and BigQuery Reservation APIs are enabled:

    gcloud services enable \
        bigquery.googleapis.com bigqueryreservation.googleapis.com
    
  4. Authentication: Authenticate the environment:

    • CLI tools and bq commands: gcloud auth login
    • SDKs and automation: gcloud auth application-default login
    • Service accounts: Set GOOGLE_APPLICATION_CREDENTIALS="/path/to/key.json"
  5. Billing & IAM Roles:

    • Verify an active Google Cloud Billing account is attached to {project_id}.
    • Ensure appropriate IAM roles:
      • roles/bigquery.admin or roles/bigquery.resourceAdmin: Reservation and capacity commitment management.
      • roles/bigquery.dataEditor or roles/bigquery.admin: Modifying table schemas, partitioning, clustering, and storage billing models.
      • roles/bigquery.jobUser: Running evaluation queries.
  6. Companion Skills Installation: This skill is part of a 3-pillar operations suite (bigquery-observability, bigquery-optimization, bigquery-troubleshooting). If any companion skill is not yet installed in your environment, install the full suite:

    npx skills add google/skills --skill bigquery-observability --skill bigquery-optimization --skill bigquery-troubleshooting
    

    (If bigquery-observability is not installed, use the self-contained baseline formulas and query templates provided directly in the reference sections below).

Workflows

Determine the optimization focus of the user's request and follow the relevant workflow:

  • Telemetry & Observability Baseline: For direct raw usage telemetry, INFORMATION_SCHEMA queries, and baseline metric calculations, consult bigquery-observability (bigquery_observability). If the bigquery-observability companion skill is not available in the active environment, all optimization guidelines, DDL templates, and decision models across this skill and its reference guides are fully self-contained.
  • Capacity & Editions Modeling: Evaluate the cost-efficiency of migrating workloads from On-Demand to Editions, as well as rightsizing active Edition reservations, baseline commitments, and autoscaling caps.
    • Instructions: Read references/capacity_planning_editions.md to provide deep links to BigQuery's built-in recommendation UIs (e.g., Slot Estimator) and guide the user through UI navigation: 1. navigate to the Slot Estimator tab, 2. select 'On-Demand' as the source to analyze historical query volume, and 3. review the Cost-Optimized Recommendations and Slot Usage Chart.
  • Table & Storage Optimization: Optimize storage costs from a billing model, physical layout, and lifecycle perspective.
    • Billing Architecture: Read references/storage_billing_models.md for guidance on evaluating aggregate compression ratios (e.g. >2:1 threshold in US) to recommend Physical vs. Logical billing, noting that the break-even ratio depends on specific regional rates and custom enterprise contracts. When providing TABLE_STORAGE queries, always scope with WHERE table_schema = '{dataset_id}', use the regional dataset view, and warn that 0 rows indicates a region mismatch or lack of native tables rather than zero billable usage.
    • Partitioning & Clustering Strategy: Read `references/t
자주 묻는 질문

BigQuery 에디션 선택을 도와주나요?

네. 에디션 전환을 모델링하고 예약 규모를 적절하게 조정할 수 있습니다.

파티셔닝이란 무엇인가요?

큰 테이블을 여러 부분으로 나누어 쿼리가 읽는 데이터를 줄이는 방법이며, 이를 통해 비용을 낮출 수 있습니다.

먼저 무엇을 설정해야 하나요?

BigQuery와 BigQuery Reservation API를 활성화하고, 결제와 적절한 역할이 갖춰져 있어야 합니다.

상세 정보

작성자의 원본 설명

Provides workflows to optimize BigQuery environments (capacity planning, editions), storage assets (partitioning, clustering, storage lifecycles, billing models), and SQL queries. Use when optimizing cost, modeling Edition migrations, rightsizing reservations, evaluating logical vs. physical storage, designing table partitioning/clustering, generating table DDL, migrating unpartitioned tables, managing partition expiration, optimizing individual SQL queries, or evaluating acceleration structures (search indexes, materialized views, BI Engine). Do not use for raw usage reporting (use bigquery-o

repo: google/skills

인기도

GitHub 스타
22k
순위
#10229
라이선스
Apache-2.0
업데이트
2026. 11. 2.

이 스킬이 유용한가요?

0

로그인 투표하려면 로그인하세요.

댓글

  • …

이 저장소의 다른 스킬

비슷한 스킬