sql-expert

Optimize SQL queries and XML table schemas for FacturaScripts on MySQL and PostgreSQL.

7|2|Updated Mar 31, 2026
One-click install
npx skills add https://github.com/FacturaScripts/fs-claude-plugin --skill sql-expert-facturascripts
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: sql-expert
Source: https://github.com/FacturaScripts/fs-claude-plugin/tree/main/fs-dev/skills/sql-expert
Command: npx skills add https://github.com/FacturaScripts/fs-claude-plugin --skill sql-expert-facturascripts

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

The sql-expert skill addresses the complex challenges of database management within FacturaScripts, providing tools for optimization, schema design, and performance enhancement.

Core Features & Use Cases

  • Database Optimization: Enhance query performance, design efficient table schemas, and create optimized migrations.
  • Schema Design: Design XML table schemas, define relationships, and create indexes for better data retrieval.
  • Use Case: When you need to optimize a slow query or design a new table that will be used across the ERP, this skill is your go-to.

Quick Start

Analyze the performance of the query 'SELECT * FROM orders WHERE status = "pending"' with the sql-expert skill.

Frequently Asked Questions about sql-expert

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

FAQPage Schema
How do I optimize slow SQL queries in FacturaScripts?

To optimize slow SQL queries in FacturaScripts, you analyze query performance using DbQuery and DataBaseWhere to refactor inefficient data retrieval operations. This process targets MySQL and PostgreSQL backends to improve execution times.

Does the FacturaScripts database layer support PostgreSQL and MySQL?

Yes, FacturaScripts database management supports both PostgreSQL and MySQL. You can optimize table schemas and query performance across both relational database systems using the underlying SQL data access layers.

What is the best way to design XML table schemas for an ERP database?

The best way to design XML table schemas for an ERP database is to define relationships and create indexes directly within FacturaScripts XML table definitions. This ensures efficient data retrieval and structured migrations.

When do I need to use DataBaseWhere for database optimization?

You need to use DataBaseWhere for database optimization when constructing filtered queries in FacturaScripts. It replaces standard SQL WHERE clauses to ensure safe, efficient data access across supported database systems.

Do I need in-depth knowledge of FacturaScripts data access layers to optimize queries?

Yes, you need in-depth knowledge of FacturaScripts data access layers to optimize queries effectively. This expertise is required to properly utilize DbQuery, DataBaseWhere, and XML table definitions for performance enhancement.