資料庫效能最佳化
資料庫效能最佳化
以執行計畫、索引及資源指標分析資料庫瓶頸。
event4u-app · 社群來源 · 資料與分析
來源狀態
可用來源
原始名稱: database
原始作者: event4u-app
這是第三方 Community Skill;2lus 收錄不代表已完整安全審計或保證安全。
資源類型
Skill
與類似 Skill 有什麼不同?
- SQL 查詢最佳化
SQL Optimization 聚焦查詢寫法;Database Optimization 檢查執行計畫、統計、鎖與資源瓶頸。
來源描述的能力
這些是來源描述的可能操作,不代表 2lus 已授予權限或已測試。
尚未列出能力,請審查原始來源。
這個 Skill 是什麼?
從查詢到鎖、I/O、記憶體與統計資料制定可量測改善。
可以做什麼?何時適合使用?
- 追查慢查詢與索引失效
- 分析 join、CTE 或視窗函數成本
- 處理鎖等待及寫入壅塞
如何使用
- 確認 DB 引擎、版本、資料量與慢查詢樣本
- 使用對應引擎的 EXPLAIN、統計與鎖觀測
- 提出索引或查詢改動及前後比較方法
使用前你需要準備
- DB 引擎與版本
- 執行計畫及資料量
你可以替換:
請提供版本、來源資料、目標與限制。
環境與相依需求
- DB 引擎與版本
- 執行計畫及資料量
使用範例與 Prompt
以下是 2lus 撰寫的示範需求;請替換為你有權處理的檔案與專案,不代表已執行或保證結果。
入門
解讀這份 EXPLAIN,找出可能的全表掃描。
實務
為慢查詢提出索引候選與寫入成本、驗證指標。
進階
分析鎖等待、I/O 與統計資料,規劃分階段改善及回滾。
實用提醒
- 索引會增加寫入與儲存成本,依實際選擇性評估。
限制與注意事項
- 來源含 MariaDB/MySQL 慣例;PostgreSQL 等引擎語法與指標需個別核對。
安全注意事項
- 使用唯讀、去識別化的計畫及指標;不要在正式庫直接試高風險變更。
使用與設定
此條目不提供已確認的通用安裝指令;請依官方文件與 Agent 版本操作。
支援平台
未確認特定 Agent 相容性
來源與授權
來源查核日期(非安全認證): 2026-10-01
請參考原始來源授權條款
原始來源 ↗ 官方文件 ↗相關 Skills
使用第三方 Skill 前,請先檢查來源、權限與執行內容。安裝指令只供查看與複製,不會由 2lus 執行。
2lus AI Skills Library 提供 Skill 的整理與使用導覽。第三方 Skill 的內容、授權與可用性以原始來源為準。使用或安裝前,請自行確認其權限與執行內容。
Database Optimization
Analyze database bottlenecks through execution plans, indexes, and resource metrics.
event4u-app · Community source · Data & Analysis
Source status
Active source
Original name: database
Original author: event4u-app
This is a third-party community skill. Inclusion by 2lus is not a complete security audit or safety guarantee.
Resource type
Skill
How is this different from similar skills?
- SQL Query Optimization
SQL Optimization focuses on query form; Database Optimization inspects plans, statistics, locks, and resource bottlenecks.
Documented capabilities
These are operations described upstream, not permissions granted or tested by 2lus.
Capabilities not declared here; review the original source.
What is this skill?
Turn query, lock, I/O, memory, and statistics findings into measurable changes.
Use cases and when to use it
- Investigate slow queries and missing indexes
- Analyze join, CTE, or window-function cost
- Handle lock waits and write contention
How to use it
- Confirm database engine, version, volume, and slow-query samples
- Inspect engine-specific EXPLAIN, statistics, and locks
- Propose index or query changes and before/after measures
What you need
- Database engine and version
- Execution plans and data volume
You can replace:
Provide versions, source material, goals, and constraints.
Environment and dependencies
- Database engine and version
- Execution plans and data volume
Usage and prompt examples
These example requests were written by 2lus. Substitute files and projects you may use; examples are not executed results or guarantees.
Beginner
Interpret this EXPLAIN and identify likely table scans.
Practical
Suggest index candidates for a slow query, including write costs and measurement criteria.
Advanced
Analyze lock waits, I/O, and statistics; plan staged improvements and rollback.
Tips
- Indexes add write and storage cost; assess selectivity with real data.
Limitations
- The source includes MariaDB/MySQL conventions; verify syntax and metrics for PostgreSQL or other engines.
Security notes
- Use read-only, redacted plans and metrics; avoid high-risk changes directly in production.
Usage and setup
No verified universal installation command is provided for this entry. Follow the official documentation for your agent version.
Supported agents
Specific agent compatibility unknown
Sources and license
Source check date (not a safety certification): 2026-10-01
Refer to the original source license terms
Original source ↗ Documentation ↗Related skills
Before using a third-party skill, review its source, permissions and executable content. Commands are for viewing and copying only; 2lus does not execute them.
2lus AI Skills Library provides curated educational guides. Third-party content, licenses and availability are governed by their original sources. Review permissions and executable content before use or installation.