database-optimization

Guide storage, caching, and indexing strategies to optimize database performance.

Updated Apr 5, 2023
One-click install
npx skills add https://github.com/fcalell/dotfiles --skill database-optimization-fcalell
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: database-optimization
Source: https://github.com/fcalell/dotfiles/tree/main/dot_claude/skills/database-optimization
Command: npx skills add https://github.com/fcalell/dotfiles --skill database-optimization-fcalell

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Optimizing database systems to reduce latency, improve throughput, and scale data access by guiding decisions on storage, caching, and indexing strategies.

Core Features & Use Cases

  • Guidance on when to use a relational database, a cache, or object storage for different data patterns (relational data, sessions, large files, API responses).
  • Best practices for query optimization, indexing, cache invalidation, and storage strategies to ensure consistent performance at scale.
  • Use cases spanning high-traffic applications, data-intensive analytics, and systems needing fast startup and responsive reads.

Quick Start

Provide a succinct assessment of a given workload and request recommended caching, indexing, and storage choices.

Frequently Asked Questions about database-optimization

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I optimize database performance for high-traffic applications?

Optimize database performance by orchestrating storage, caching, and indexing strategies tailored to your workload, reducing latency and improving throughput for high-traffic applications. It guides decisions on data patterns, query optimization, and cache invalidation to ensure consistent scale.

When should I use object storage vs a cache for large files and API responses?

Use object storage for large content like blobs and files, while caching handles frequent API responses and session data. This approach ensures you select the right storage strategy based on data patterns, keeping data access fast and scalable across your architecture.

What is the best way to handle cache invalidation after data mutations?

Handle cache invalidation after mutations by applying best practices for query optimization and storage orchestration. It provides guidance on ensuring cache consistency, verifying that stale data is cleared or updated appropriately when underlying relational data changes.

Does this approach support cursor-based pagination and composite indexes?

Yes, the optimization strategy explicitly supports implementing composite indexes and cursor-based pagination. These techniques are integrated into the indexing guidance to manage large datasets efficiently and maintain responsive reads under heavy query loads.

Can I use in-datacenter Cache API and KV for global caching simultaneously?

Yes, you can orchestrate both in-datacenter Cache API for fast local access and KV for global caching. The strategy guides selecting and combining these caching layers to satisfy technical requirements for low latency and high scale across regions.

How do I implement batch data loading to improve query performance?

Improve query performance by implementing batch data loading alongside composite indexes and cache invalidation. It guides structuring data access patterns to minimize redundant fetches, ensuring responsive reads for data-intensive analytics and high-traffic workloads.