[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M78KW0T8RKC5MS7ZSB3GV2FD":3,"skill-same:01M78KW0T8RKC5MS7ZSB3GV2FD":55},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":32,"commitSha":33,"skillDirectory":34,"forksCount":35,"repositoryHtmlUrl":36,"repositoryHomepageUrl":6,"ownerHtmlUrl":37,"ownerBlogUrl":38,"ownerDescription":39,"updatedAt":40,"install":41,"resources":54},"01M78KW0T8RKC5MS7ZSB3GV2FD","managing-database-partitions",null,"Process use when you need to work with database partitioning.\nThis skill provides table partitioning strategies with comprehensive guidance and automation.\nTrigger with phrases like \"partition tables\", \"implement partitioning\",\nor \"optimize large tables\".","jukeyman\u002Fjukeyman-skills","jukeyman","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F142960420?v=4","01M78FR4Y3DHMMCBCC0GXXNB3F","RICK JEFFERSON","01M78FR4Z8RVQRAD31Y5J7V6EB",1,"MIT","https:\u002F\u002Fgithub.com\u002Fjukeyman\u002Fjukeyman-skills\u002Fblob\u002Fmain\u002Fskills\u002Fdatabase--database-partition-manager--managing-database-partitions\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: managing-database-partitions\ndescription: |\n  Process use when you need to work with database partitioning.\n  This skill provides table partitioning strategies with comprehensive guidance and automation.\n  Trigger with phrases like \"partition tables\", \"implement partitioning\",\n  or \"optimize large tables\".\n\nallowed-tools: Read, Write, Edit, Grep, Glob, Bash(psql:*), Bash(mysql:*), Bash(mongosh:*)\nversion: 1.0.0\nauthor: Jeremy Longshore \u003Cjeremy@intentsolutions.io>\nlicense: MIT\ncompatible-with: claude-code, codex, openclaw\ntags: [database, database-partitions]\n---\n# Database Partition Manager\n\n## Overview\n\nImplement and manage table partitioning for PostgreSQL and MySQL to improve query performance and simplify data lifecycle management on large tables. This skill covers range partitioning (by date or ID), list partitioning (by category or region), hash partitioning (for even distribution), and composite partitioning.\n\n## Prerequisites\n\n- PostgreSQL 10+ (declarative partitioning) or MySQL 5.7+ (native partitioning)\n- Database admin credentials with CREATE TABLE and ALTER TABLE permissions\n- `psql` or `mysql` CLI for executing partition DDL\n- Table size metrics: `SELECT pg_size_pretty(pg_total_relation_size('table_name'))` or `SELECT data_length FROM information_schema.TABLES`\n- Query patterns on the target table (especially WHERE clause columns used for filtering)\n- Maintenance window availability for initial partition migration on existing tables\n\n## Instructions\n\n1. Identify partitioning candidates by finding tables that exceed 10GB or 100M rows, have time-based query patterns, or require periodic data purging. Query `pg_stat_user_tables` to find tables with high sequential scan counts on large row sets.\n\n2. Select the partition key based on the most common query filter column. For time-series data, use the timestamp column. For multi-tenant data, use tenant_id. The partition key must appear in most WHERE clauses to enable partition pruning.\n\n3. Choose the partitioning strategy:\n   - **Range**: Best for time-series data. Create monthly or daily partitions. Queries filtering by date range scan only relevant partitions.\n   - **List**: Best for categorical data. Create one partition per category, region, or status value.\n   - **Hash**: Best for even distribution when no natural range exists. Distribute rows across N partitions using hash of the partition key.\n   - **Composite**: Combine range + list for multi-dimensional partitioning (e.g., range by date, then list by region).\n\n4. For PostgreSQL, create the partitioned parent table: `CREATE TABLE orders (id bigint, created_at timestamptz, ...) PARTITION BY RANGE (created_at)`. Then create child partitions: `CREATE TABLE orders_2024_01 PARTITION OF orders FOR VALUES FROM ('2024-01-01') TO ('2024-02-01')`.\n\n5. For MySQL, define partitions inline: `ALTER TABLE orders PARTITION BY RANGE (YEAR(created_at) * 100 + MONTH(created_at)) (PARTITION p202401 VALUES LESS THAN (202402), ...)`.\n\n6. Migrate data from an existing unpartitioned table to a partitioned table:\n   - Create the new partitioned table with identical schema\n   - Copy data in batches: `INSERT INTO orders_partitioned SELECT * FROM orders_old WHERE created_at BETWEEN ... AND ...`\n   - Verify row counts match between old and new tables\n   - Rename tables atomically: `ALTER TABLE orders RENAME TO orders_old; ALTER TABLE orders_partitioned RENAME TO orders;`\n\n7. Create indexes on each partition. In PostgreSQL, indexes on the parent table automatically propagate to child partitions. Create the primary key and any secondary indexes on the partitioned table.\n\n8. Automate future partition creation with a scheduled script or cron job. For monthly range partitions, create the next 3 months of partitions in advance to prevent INSERT failures when a new month begins.\n\n9. Implement partition maintenance: drop or detach old partitions for data retention (`ALTER TABLE orders DETACH PARTITION orders_2022_01`), then archive or delete the detached partition. This is vastly faster than `DELETE FROM orders WHERE created_at \u003C '2023-01-01'`.\n\n10. Verify partition pruning works by running `EXPLAIN` on typical queries and confirming only relevant partitions are scanned. Look for \"Partitions: 1\u002F24\" in the plan output indicating effective pruning.\n\n## Output\n\n- **Partition DDL scripts** for creating partitioned tables and child partitions\n- **Data migration scripts** for moving data from unpartitioned to partitioned tables\n- **Partition maintenance scripts** for automated creation, detachment, and archival\n- **Partition pruning verification queries** confirming optimizer uses partition elimination\n- **Cron job configurations** for scheduled partition creation and cleanup\n\n## Error Handling\n\n| Error | Cause | Solution |\n|-------|-------|---------|\n| `no partition of relation \"table\" found for row` | INSERT targets a range with no matching partition | Create the missing partition; implement automated partition pre-creation for future ranges |\n| Partition pruning not occurring | Query filter does not use the partition key, or uses a function on the key column | Rewrite query to filter directly on the partition key column; avoid wrapping partition key in functions |\n| Slow data migration from unpartitioned table | Single large INSERT\u002FSELECT locks the table and fills WAL | Migrate in batches by partition range; use `pg_repack` for online migration; increase `maintenance_work_mem` and `max_wal_size` |\n| Foreign key references prevent partitioning | PostgreSQL does not support foreign keys referencing partitioned tables (pre-v12) | Upgrade to PostgreSQL 12+; or remove FK constraints and enforce referential integrity at application level |\n| Too many partitions causing planner slowdown | Hundreds or thousands of child partitions degrade query planning time | Use wider partition ranges (monthly instead of daily); enable `enable_partition_pruning`; consider sub-partitioning instead of flat partitioning |\n\n## Examples\n\n**Monthly range partitioning for an events table**: A 500GB events table with 2B rows partitioned by `created_at` into monthly partitions. Queries filtering by date range (last 7 days, last month) now scan only 1-2 partitions instead of the full table. Partition drop replaces a 4-hour DELETE operation with a sub-second DDL command for monthly data purges.\n\n**Hash partitioning for a sessions table**: A sessions table with random UUID primary keys and no natural range column. Hash partition by `session_id` across 16 partitions to distribute I\u002FO evenly. Parallel sequential scans across partitions improve full-table analytic queries by 8x on an 8-core server.\n\n**Composite partitioning for multi-region SaaS**: Orders table partitioned first by range on `created_at` (monthly), then by list on `region` (us-east, us-west, eu, asia). Queries for \"all US orders this month\" prune to just 2 of 48 total partitions, reducing scan volume by 96%.\n\n## Resources\n\n- PostgreSQL table partitioning: https:\u002F\u002Fwww.postgresql.org\u002Fdocs\u002Fcurrent\u002Fddl-partitioning.html\n- MySQL partitioning: https:\u002F\u002Fdev.mysql.com\u002Fdoc\u002Frefman\u002F8.0\u002Fen\u002Fpartitioning.html\n- pg_partman extension (automated partition management): https:\u002F\u002Fgithub.com\u002Fpgpartman\u002Fpg_partman\n- Partition pruning internals: https:\u002F\u002Fwww.postgresql.org\u002Fdocs\u002Fcurrent\u002Fddl-partitioning.html#DDL-PARTITION-PRUNING","# Database Partition Manager\n\n## Overview\n\nImplement and manage table partitioning for PostgreSQL and MySQL to improve query performance and simplify data lifecycle management on large tables. This skill covers range partitioning (by date or ID), list partitioning (by category or region), hash partitioning (for even distribution), and composite partitioning.\n\n## Prerequisites\n\n- PostgreSQL 10+ (declarative partitioning) or MySQL 5.7+ (native partitioning)\n- Database admin credentials with CREATE TABLE and ALTER TABLE permissions\n- `psql` or `mysql` CLI for executing partition DDL\n- Table size metrics: `SELECT pg_size_pretty(pg_total_relation_size('table_name'))` or `SELECT data_length FROM information_schema.TABLES`\n- Query patterns on the target table (especially WHERE clause columns used for filtering)\n- Maintenance window availability for initial partition migration on existing tables\n\n## Instructions\n\n1. Identify partitioning candidates by finding tables that exceed 10GB or 100M rows, have time-based query patterns, or require periodic data purging. Query `pg_stat_user_tables` to find tables with high sequential scan counts on large row sets.\n\n2. Select the partition key based on the most common query filter column. For time-series data, use the timestamp column. For multi-tenant data, use tenant_id. The partition key must appear in most WHERE clauses to enable partition pruning.\n\n3. Choose the partitioning strategy:\n   - **Range**: Best for time-series data. Create monthly or daily partitions. Queries filtering by date range scan only relevant partitions.\n   - **List**: Best for categorical data. Create one partition per category, region, or status value.\n   - **Hash**: Best for even distribution when no natural range exists. Distribute rows across N partitions using hash of the partition key.\n   - **Composite**: Combine range + list for multi-dimensional partitioning (e.g., range by date, then list by region).\n\n4. For PostgreSQL, create the partitioned parent table: `CREATE TABLE orders (id bigint, created_at timestamptz, ...) PARTITION BY RANGE (created_at)`. Then create child partitions: `CREATE TABLE orders_2024_01 PARTITION OF orders FOR VALUES FROM ('2024-01-01') TO ('2024-02-01')`.\n\n5. For MySQL, define partitions inline: `ALTER TABLE orders PARTITION BY RANGE (YEAR(created_at) * 100 + MONTH(created_at)) (PARTITION p202401 VALUES LESS THAN (202402), ...)`.\n\n6. Migrate data from an existing unpartitioned table to a partitioned table:\n   - Create the new partitioned table with identical schema\n   - Copy data in batches: `INSERT INTO orders_partitioned SELECT * FROM orders_old WHERE created_at BETWEEN ... AND ...`\n   - Verify row counts match between old and new tables\n   - Rename tables atomically: `ALTER TABLE orders RENAME TO orders_old; ALTER TABLE orders_partitioned RENAME TO orders;`\n\n7. Create indexes on each partition. In PostgreSQL, indexes on the parent table automatically propagate to child partitions. Create the primary key and any secondary indexes on the partitioned table.\n\n8. Automate future partition creation with a scheduled script or cron job. For monthly range partitions, create the next 3 months of partitions in advance to prevent INSERT failures when a new month begins.\n\n9. Implement partition maintenance: drop or detach old partitions for data retention (`ALTER TABLE orders DETACH PARTITION orders_2022_01`), then archive or delete the detached partition. This is vastly faster than `DELETE FROM orders WHERE created_at \u003C '2023-01-01'`.\n\n10. Verify partition pruning works by running `EXPLAIN` on typical queries and confirming only relevant partitions are scanned. Look for \"Partitions: 1\u002F24\" in the plan output indicating effective pruning.\n\n## Output\n\n- **Partition DDL scripts** for creating partitioned tables and child partitions\n- **Data migration scripts** for moving data from unpartitioned to partitioned tables\n- **Partition maintenance scripts** for automated creation, detachment, and archival\n- **Partition pruning verification queries** confirming optimizer uses partition elimination\n- **Cron job configurations** for scheduled partition creation and cleanup\n\n## Error Handling\n\n| Error | Cause | Solution |\n|-------|-------|---------|\n| `no partition of relation \"table\" found for row` | INSERT targets a range with no matching partition | Create the missing partition; implement automated partition pre-creation for future ranges |\n| Partition pruning not occurring | Query filter does not use the partition key, or uses a function on the key column | Rewrite query to filter directly on the partition key column; avoid wrapping partition key in functions |\n| Slow data migration from unpartitioned table | Single large INSERT\u002FSELECT locks the table and fills WAL | Migrate in batches by partition range; use `pg_repack` for online migration; increase `maintenance_work_mem` and `max_wal_size` |\n| Foreign key references prevent partitioning | PostgreSQL does not support foreign keys referencing partitioned tables (pre-v12) | Upgrade to PostgreSQL 12+; or remove FK constraints and enforce referential integrity at application level |\n| Too many partitions causing planner slowdown | Hundreds or thousands of child partitions degrade query planning time | Use wider partition ranges (monthly instead of daily); enable `enable_partition_pruning`; consider sub-partitioning instead of flat partitioning |\n\n## Examples\n\n**Monthly range partitioning for an events table**: A 500GB events table with 2B rows partitioned by `created_at` into monthly partitions. Queries filtering by date range (last 7 days, last month) now scan only 1-2 partitions instead of the full table. Partition drop replaces a 4-hour DELETE operation with a sub-second DDL command for monthly data purges.\n\n**Hash partitioning for a sessions table**: A sessions table with random UUID primary keys and no natural range column. Hash partition by `session_id` across 16 partitions to distribute I\u002FO evenly. Parallel sequential scans across partitions improve full-table analytic queries by 8x on an 8-core server.\n\n**Composite partitioning for multi-region SaaS**: Orders table partitioned first by range on `created_at` (monthly), then by list on `region` (us-east, us-west, eu, asia). Queries for \"all US orders this month\" prune to just 2 of 48 total partitions, reducing scan volume by 96%.\n\n## Resources\n\n- PostgreSQL table partitioning: https:\u002F\u002Fwww.postgresql.org\u002Fdocs\u002Fcurrent\u002Fddl-partitioning.html\n- MySQL partitioning: https:\u002F\u002Fdev.mysql.com\u002Fdoc\u002Frefman\u002F8.0\u002Fen\u002Fpartitioning.html\n- pg_partman extension (automated partition management): https:\u002F\u002Fgithub.com\u002Fpgpartman\u002Fpg_partman\n- Partition pruning internals: https:\u002F\u002Fwww.postgresql.org\u002Fdocs\u002Fcurrent\u002Fddl-partitioning.html#DDL-PARTITION-PRUNING",{"name":5,"tags":24,"author":27,"license":15,"version":28,"description":29,"allowed-tools":30,"compatible-with":31},[25,26],"database","database-partitions","Jeremy Longshore \u003Cjeremy@intentsolutions.io>","1.0.0","Process use when you need to work with database partitioning.\nThis skill provides table partitioning strategies with comprehensive guidance and automation.\nTrigger with phrases like \"partition tables\", \"implement partitioning\",\nor \"optimize large tables\".\n","Read, Write, Edit, Grep, Glob, Bash(psql:*), Bash(mysql:*), Bash(mongosh:*)","claude-code, codex, openclaw","main","99825ad3f3bcc6597ddcc7294a14e6e922f2b67b","skills\u002Fdatabase--database-partition-manager--managing-database-partitions",0,"https:\u002F\u002Fgithub.com\u002Fjukeyman\u002Fjukeyman-skills","https:\u002F\u002Fgithub.com\u002Fjukeyman","https:\u002F\u002FRJBUSINESSSOLUTIONS.ORG","Credit and Finance Expert | Developer\r\n\r\nI'm Rick Jefferson, a seasoned credit and finance expert with over a decade of experience in financial literacy,","2026-07-13 07:03:29",{"source":8,"skillName":5,"commands":42,"prompt":52,"zipAvailable":53},[43,46,49],{"tool":44,"command":45},"npx","npx skills add jukeyman\u002Fjukeyman-skills --skill managing-database-partitions",{"tool":47,"command":48},"bunx","bunx skills add jukeyman\u002Fjukeyman-skills --skill managing-database-partitions",{"tool":50,"command":51},"pnpm","pnpm dlx skills add jukeyman\u002Fjukeyman-skills --skill managing-database-partitions","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fjukeyman\u002Fjukeyman-skills\u002Fblob\u002Fmain\u002Fskills\u002Fdatabase--database-partition-manager--managing-database-partitions\u002FSKILL.md",true,[],[56,63,70,77,84,92],{"skillNo":57,"name":58,"nameZh":6,"description":59,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":60,"categories":61,"keywords":62,"publishedAt":19},"01M79ANS2SM329NEP5ZCX106RR","zustand-store-creator","Create zustand store creator operations. Auto-activating skill for Frontend Development.\nTriggers on: zustand store creator, zustand store creator\nPart of the Frontend Development skill category. Use when working with zustand store creator functionality. Trigger with phrases like \"zustand store creator\", \"zustand creator\", \"zustand\".","https:\u002F\u002Fgithub.com\u002Fjukeyman\u002Fjukeyman-skills\u002Fblob\u002Fmain\u002Fskills\u002Fzustand-store-creator\u002FSKILL.md",[],[],{"skillNo":64,"name":65,"nameZh":6,"description":66,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":67,"categories":68,"keywords":69,"publishedAt":19},"01M79AMZKP4YDEZ7EHG1Y7PP74","zero-trust-config-helper","Configure with zero trust config helper operations. Auto-activating skill for Security Advanced.\nTriggers on: zero trust config helper, zero trust config helper\nPart of the Security Advanced skill category. Use when configuring systems or services. Trigger with phrases like \"zero trust config helper\", \"zero helper\", \"zero\".","https:\u002F\u002Fgithub.com\u002Fjukeyman\u002Fjukeyman-skills\u002Fblob\u002Fmain\u002Fskills\u002Fzero-trust-config-helper\u002FSKILL.md",[],[],{"skillNo":71,"name":72,"nameZh":6,"description":73,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":74,"categories":75,"keywords":76,"publishedAt":19},"01M79AMJSBCEJQNBTYNAHYN5HM","zapier-integration-helper","Assist with zapier integration helper operations. Auto-activating skill for Business Automation.\nTriggers on: zapier integration helper, zapier integration helper\nPart of the Business Automation skill category. Use when working with APIs or building integrations. Trigger with phrases like \"zapier integration helper\", \"zapier helper\", \"zapier\".","https:\u002F\u002Fgithub.com\u002Fjukeyman\u002Fjukeyman-skills\u002Fblob\u002Fmain\u002Fskills\u002Fzapier-integration-helper\u002FSKILL.md",[],[],{"skillNo":78,"name":79,"nameZh":6,"description":80,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":81,"categories":82,"keywords":83,"publishedAt":19},"01M79AHJZGVMARS13VFQYRR1MP","yaml-config-validator","Validate yaml config validator operations. Auto-activating skill for DevOps Basics.\nTriggers on: yaml config validator, yaml config validator\nPart of the DevOps Basics skill category. Use when configuring systems or services. Trigger with phrases like \"yaml config validator\", \"yaml validator\", \"yaml\".","https:\u002F\u002Fgithub.com\u002Fjukeyman\u002Fjukeyman-skills\u002Fblob\u002Fmain\u002Fskills\u002Fyaml-config-validator\u002FSKILL.md",[],[],{"skillNo":85,"name":86,"nameZh":6,"description":87,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":88,"sourceHtmlUrl":89,"categories":90,"keywords":91,"publishedAt":19},"01M79AHGDZRN0020RDQSQDPAM8","xvary-stock-research","Thesis-driven equity analysis from public SEC EDGAR and market data; \u002Fanalyze, \u002Fscore, \u002Fcompare workflows with bundled Python tools (Claude Code, Cursor, Codex).","https:\u002F\u002Fgithub.com\u002Fjukeyman\u002Fjukeyman-skills\u002Fblob\u002Fmain\u002Fskills\u002Fxvary-stock-research\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Fjukeyman\u002Fjukeyman-skills\u002Fblob\u002Fmain\u002Fskills\u002Fxvary-stock-research\u002FSKILL.md",[],[],{"skillNo":93,"name":94,"nameZh":6,"description":95,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":96,"categories":97,"keywords":98,"publishedAt":19},"01M79AHCYJ9FV9RMHQ24HDRN33","xss-vulnerability-scanner","Scan xss vulnerability scanner operations. Auto-activating skill for Security Fundamentals.\nTriggers on: xss vulnerability scanner, xss vulnerability scanner\nPart of the Security Fundamentals skill category. Use when working with xss vulnerability scanner functionality. Trigger with phrases like \"xss vulnerability scanner\", \"xss scanner\", \"xss\".","https:\u002F\u002Fgithub.com\u002Fjukeyman\u002Fjukeyman-skills\u002Fblob\u002Fmain\u002Fskills\u002Fxss-vulnerability-scanner\u002FSKILL.md",[],[]]