بنقرة واحدة
db-indexing
General strategy for identifying and adding missing database indexes in ISUCON web applications
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
القائمة
General strategy for identifying and adding missing database indexes in ISUCON web applications
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
استنادا إلى تصنيف SOC المهني
MCP tool reference — exec, benchmark_start, benchmark_status, note_write, etc. Use when: executing commands on VMs, running benchmarks, or recording findings
ISUCON13 contest manual — server topology, service management, benchmark execution, and rules. Use when: checking environment setup, running benchmarks, or understanding contest constraints
ISUPipe application manual — features, terms, constraints, and API specs. Use when: understanding the app domain, checking API behavior or MUST/MAY requirements
General techniques for optimizing user icon/avatar image serving in ISUCON web applications
General techniques for identifying and fixing N+1 query problems in ISUCON web applications
Install and use alp (Access Log Profiler) to identify slow nginx endpoints and analyze request patterns
| name | db-indexing |
| description | General strategy for identifying and adding missing database indexes in ISUCON web applications |
ISUCON の初期実装では、テーブルに適切なインデックスが設定されていないことが多い。スキーマを調査し、クエリパターンに基づいてインデックスを追加するのは最も ROI の高い最適化の一つ。
# テーブル一覧
mysql -u <user> -p<password> <database> -e "SHOW TABLES"
# テーブル定義の確認
mysql -u <user> -p<password> <database> -e "SHOW CREATE TABLE <table_name>"
# 既存インデックスの確認
mysql -u <user> -p<password> <database> -e "SHOW INDEX FROM <table_name>"
WHERE, JOIN, ORDER BY で使われるカラムを特定# Go の場合
grep -rn 'SELECT\|WHERE\|JOIN\|ORDER BY' /path/to/webapp/go/
user_id, *_id などの参照カラムにインデックスがない場合は追加:
ALTER TABLE <table> ADD INDEX idx_<column> (<column>);
WHERE + ORDER BY の組み合わせが頻出する場合:
ALTER TABLE <table> ADD INDEX idx_<col1>_<col2> (<col1>, <col2>);
SELECT するカラムも含めて、テーブルアクセスなしで結果を返せる場合:
ALTER TABLE <table> ADD INDEX idx_covering (<where_col>, <select_col>);
/api/initialize でデータを初期化するinit.sh やスキーマファイルで DROP TABLE / CREATE TABLE される場合、インデックスも消える