sql-optimization-patterns
यह क्या करती है
यह tool आपकी database queries को धीमा करने वाली समस्याएं ढूंढने और ठीक करने में मदद करता है। यह analyze करता है कि database आपके commands को कैसे चलाता है, और सुझाव देता है कि indexes जोड़ें या queries दोबारा लिखें, ताकि सब कुछ तेज़ी से चले।
कब इस्तेमाल करें
- ✓जब कोई database query जवाब देने में बहुत समय ले रही हो।
- ✓जब database का structure बनाते या बदलते समय performance बेहतर करना हो।
- ✓यह समझने के लिए कि database पर इतना load क्यों है और उसे कैसे कम किया जा सकता है।
Skill का लिंक
https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/sql-optimization-patterns/SKILL.mdइसे कॉपी करके अपने AI (Claude, ChatGPT या Cursor) में पेस्ट करें और निर्देशों का पालन करने को कहें।
कैसे इस्तेमाल करें
सबसे आसान तरीका: मैसेज कॉपी करके अपने AI में पेस्ट करें। वह skill पढ़कर निर्देशों का पालन करेगा।
पेस्ट करने के लिए तैयार मैसेज
Claude Code, Codex या Cursor के लिए: प्रोजेक्ट फ़ोल्डर में चलाएँ और skill इंस्टॉल हो जाएगी।
SKILL.md डाउनलोड करें और अपने एजेंट के skills फ़ोल्डर में रखें।
AI से क्या माँगें: उदाहरण
“मेरी users लाने वाली SQL query बहुत धीमी है, क्या आप इसे optimize करने में मदद कर सकते हैं?”
हर हफ़्ते 5 नई skills, 1 मिनट में पढ़ें।
यह कैसे काम करती है
tool आपकी query के 'execution plan' को analyze करता है, यानी database कोई command चलाने का तरीका कैसे चुनता है। इसके आधार पर यह बदलाव सुझाता है, जैसे indexes जोड़ना या query दोबारा लिखना, ताकि वह ज़्यादा कुशल हो।
तकनीकी सामग्री (मूल SKILL.md)
लेखक का मूल टेक्स्ट, अंग्रेज़ी में, सीधे GitHub से।
SQL Optimization Patterns
Diagnose slow SQL with query plans, preserve query results, and verify indexing or query changes against representative data.
Use this skill when
- Debugging slow-running queries
- Designing performant database schemas
- Optimizing application response times
- Reducing database load and costs
- Improving scalability for growing datasets
- Analyzing EXPLAIN query plans
- Implementing efficient indexes
- Resolving N+1 query problems
Do not use this skill when
- The task is unrelated to sql optimization patterns
- You need a different domain or tool outside this scope
Instructions
- Confirm database engine/version, query parameters, expected rows, data distribution and the permitted environment. Start read-only; obtain authorization before DDL, data changes, configuration changes or maintenance.
- Compare result sets before comparing performance. EXPLAIN ANALYZE executes the statement: use approved representative data, account for functions and triggers, and do not assume a transaction rollback undoes every side effect.
- Record the observed plan, timing conditions and correctness checks. Indexes and query rewrites are hypotheses, not universal speed improvements.
- If detailed examples are required, open
resources/implementation-playbook.md.
Resources
resources/implementation-playbook.mdfor detailed patterns and examples.
Limitations
- Use this skill only when the task clearly matches the scope described above.
- Do not treat the output as a substitute for environment-specific validation, testing, or expert review.
- Stop and ask for clarification if required inputs, permissions, safety boundaries, or success criteria are missing.
Worked example
The playbook includes an executable SQLite batch-loading example with bound values and an empty-input case. The repository test exercises it alongside pagination ties and aggregation equivalence. SQLite correctness checks do not establish PostgreSQL performance or production safety.
अक्सर पूछे जाने वाले सवाल
'execution plan' क्या होता है?
यह वह रास्ता है जो database तय करता है, ताकि आपका मांगा हुआ data ढूंढकर वापस दे सके। इसे देखने से पता चलता है कि रुकावट (bottleneck) कहां है।
'indexes' क्या होते हैं?
ये किताब के index जैसे होते हैं। इनसे database पूरा data पढ़े बिना किसी खास जानकारी को बहुत तेज़ी से ढूंढ लेता है।
क्या tool मेरी database को बदल देगा?
सीधे नहीं। यह सिर्फ सुझाव देता है और कोई बदलाव करने से पहले आपकी अनुमति मांगता है, और शुरुआत read-only analysis से होती है।
जानकारी
लेखक का मूल विवरण
Diagnose slow SQL with query plans, preserve query results, and verify indexing or query changes against representative data.
लोकप्रियता
- GitHub स्टार
- 48k
- रैंकिंग में स्थान
- #5845
- लाइसेंस
- MIT
- अपडेट की गई
- 15/10/2026
कमेंट
- …
इस repository की और skills
00-andruia-consultant
48kआपके एजेंट को AI प्रोजेक्ट शुरू करने या उन्हें बेहतर बनाने में मदद करता है। यह code का विश्लेषण करता है, tools सुझाता है और स्पेनिश भाषा में action plan बनाता है।
007
48kआपका एजेंट security audit और threat modeling करता है। यह प्रोजेक्ट को हमलों और कमजोरियों से बचाने में काम आता है।
10-andruia-skill-smith
48kआपके एजेंट को AI tools बनाने या उन्हें बेहतर करने में मदद करता है। यह तय करता है कि tools कैसे काम करेंगे, documentation लिखता है और structure की जांच करता है।
20-andruia-niche-intelligence
48kआपका एजेंट किसी खास industry का summary बनाता है। भरोसेमंद स्रोतों की मदद से यह प्रोजेक्ट का संदर्भ, नियम, इस्तेमाल के तरीके और जोखिम समझने में मदद करता है।
मिलती-जुलती skills
diffs
394kयह आपके एजेंट को बदलावों का असली diff बनाने देती है, जिसे व्यूअर लिंक या इमेज फ़ाइल के रूप में साझा किया जा सकता है, हाथ से लिखे सारांश के बजाय।
coding-agent
394kयह आपके एजेंट को बड़े कोडिंग काम Codex, Claude Code या OpenCode को बैकग्राउंड वर्कर के रूप में सौंपने, फिर उसकी प्रगति जांचने में मदद करती है।
gh-issues
394kयह आपके एजेंट को GitHub issues खोजने, उनमें से काम करने लायक चुनने, और सुधार के साथ pull requests खोलने में मदद करती है, जिसमें समीक्षा टिप्पणियों का फ़ॉलो-अप भी शामिल है।