Bigquery Sql

作者 gemini-cli-extensions2df10e25bbf7無授權條款215 個星標收錄於 2026年10月8日更新於 2026年10月8日儲存庫今天更新

Provides BigQuery SQL query optimization techniques, execution best practices, and performance tuning rules for high-efficiency querying. Use when optimizing BigQuery SQL queries, reducing query costs, or designing performant SQL transformations.

僅含說明Data & Analytics
AI 產生的概覽

提供 BigQuery SQL 最佳化規則,用於提升查詢效能、降低成本並設計高效轉換。

功能
提供一套 BigQuery SQL 效能與效率準則,涵蓋資料行裁剪、述詞下推、聯結最佳化和具體化策略。它區分自動套用的規則、必須執行的改寫,以及需確認後才提出的條件性變更。它也要求輸出一個僅列出已套用最佳化的摘要區段。
適用情境
適用於最佳化 BigQuery SQL 查詢、降低查詢成本或設計高效能 SQL 轉換的情境。適合依據所列規則審查或改寫現有 BigQuery 查詢。
執行需求
僅為說明性指示,不附帶指令碼。假定處理對象是 BigQuery SQL 查詢,本身不需要憑證或網路存取。

BigQuery SQL Optimization

Performance and efficiency guidelines for BigQuery SQL queries. Includes rules for column pruning, predicate pushdown, join optimization, and materialization strategies.

SQL Optimization Rules

[!TIP] Always include a "Summary of Optimizations" section listing only the optimizations applied.

Always Apply (Automatic)

  • Column Pruning: Remove unnecessary columns from all query stages.
  • Common Subexpression Reuse: Factor out identical expressions to avoid redundant computation.
  • Predicate Pushdown: Apply WHERE filters as early as possible.
  • Early Aggregation: Perform GROUP BY before joins when possible.
  • Intermediate Materialization: Choose VIEW vs TABLE for intermediate nodes based on efficiency.
Intermediate Node Strategy
  • VIEW: Small datasets or simple transformations.
  • TABLE: Large datasets, expensive computations, or nodes reused multiple times.

Always Rewrite (Mandatory)

  • WHERE <col> IN (SELECT ...): Replace With WHERE EXISTS (SELECT 1 FROM ...)
  • WHERE (SELECT COUNT(*) ...) > 0: Replace With WHERE EXISTS (SELECT 1 FROM ...)

Propose with Confirmation (Conditional)

  • UNION → UNION ALL: Faster (skips deduplication), but permits duplicate rows.
  • COUNT(DISTINCT) → APPROX_COUNT_DISTINCT: Faster and lower memory, but approximate.

來源與署名

來源:gemini-cli-extensions/data-agent-kit-starter-pack位於skills/bigquery-sql提交2df10e2

授權條款: 無授權條款

內容歸原作者所有。SourceWeft 從公開儲存庫中收錄這些內容。

檢舉或申請下架

更多來自 gemini-cli-extensions/data-agent-kit-starter-pack 的技能

Schema Mapping

gemini-cli-extensions

為 ETL、ELT 或資料整合任務規劃來源到目標的結構描述對應,產出文件化的對應宣言。

Data & Analytics215今天更新

Resolving Mcp Region Configs

gemini-cli-extensions

修復區域性 Google Cloud MCP 伺服器設定中未取代的區域佔位符,讓缺少的 MCP 工具得以註冊。

DevOps & Cloud215今天更新

Notebook Guidance

gemini-cli-extensions

This skill guides the use of Jupyter notebooks for data analysis, exploration, and visualization, particularly with BigQuery. It outlines best practices for notebook execution and validation (supporting both cell-by-cell execution and full notebook generation depending on tool availability), library installation, and structuring notebooks for clarity. It also covers specific rules for data cleaning, plotting, and integrating with BigQuery SQL and machine learning workflows. Relevant when any of the following conditions are true: 1. The user request involves a data analysis, data exploration, data visualization, or data insights task that requires multiple steps, queries, or visualizations to answer. 2. The user explicitly requests a notebook (.ipynb). 3. You are creating, editing, or executing cells in a Jupyter notebook. 4. You need to query BigQuery from within a notebook. DO NOT use the Python BigQuery client library; instead, you MUST use the `%%bqsql` magics explained in this skill.

待分類215今天更新

Ml Best Practices

gemini-cli-extensions

為機器學習筆記本提供逐步方案,涵蓋分群、預測、分類、迴歸與模型比較。

Data & Analytics215今天更新

Managing Python Dependencies

gemini-cli-extensions

指導代理偵測 Python 專案的相依性管理器並正確安裝套件,而不是使用全域 pip。

Software Development215今天更新

Google Cloud Storage Fuse

gemini-cli-extensions

Mounts Cloud Storage buckets as a POSIX file system with Cloud Storage FUSE (gcsfuse). Use when you need to interact with gcsfuse — decide whether FUSE, native gs:// reads, or Filestore/Managed Lustre fits a workload, deploy tuned mounts on GKE, Compute Engine, or Cloud Run, enable and size the file, stat, and list caches, tune mount flags or config-file settings, apply workload profiles, keep ML checkpointing safe (rename atomicity, hierarchical namespace, close-time finalization, concurrent writers), or diagnose slow training, low throughput, or GCS bill spikes on existing mounts with gcsfuse metrics. Covers mount semantics, the gcsfuse CLI and config file, the GKE gcsfuse CSI driver (Workload Identity principal:// bindings, profile StorageClasses, sidecar sizing), and Cloud Run volume mounts. Don't use for bucket administration or data management without a mount (google-cloud-storage-basics) or for fully POSIX-compliant shared file systems (Filestore, Managed Lustre).

待分類215今天更新