query-optimize

Analyzes and optimizes 1C:Enterprise queries and data composition schemas using Unica MCP tools.

1|2|Updated Jul 19, 2026
One-click install
npx skills add https://github.com/IngvarConsulting/unica-marketplace --skill query-optimize-ingvarconsulting
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: query-optimize
Source: https://github.com/IngvarConsulting/unica-marketplace/tree/main/plugins/unica/skills/query-optimize
Command: npx skills add https://github.com/IngvarConsulting/unica-marketplace --skill query-optimize-ingvarconsulting

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Slow or incorrect 1C:Enterprise queries and DCS (СКД) queries are hard to diagnose without structured tooling. This Skill provides a disciplined workflow for locating query text, inspecting execution context, and optimizing filters, joins, virtual tables, and temporary tables through the Unica MCP server. ## Core Features & Use Cases - Query extraction and context analysis: Locates exact query text with unica.code.search and unica.dcs.info, then inspects modules, callers, and temporary table chains via unica.code.outline and unica.code.graph. - Metadata and standards grounding: Uses unica.meta.info and unica.standards.search to verify registers, indexes, and development-standard query rules before rewriting. - DB-aware diagnostics: Distinguishes PostgreSQL, MS SQL Server, and file-mode evidence models, tying index and lock recommendations to predicates, transactions, and traces. - Use Case: A report built on a data composition schema runs slowly in production. The Skill extracts the DCS query, checks virtual table parameters and temporary table materialization, and proposes one targeted fix at a time backed by trace evidence. ## Quick Start Ask the assistant to analyze and optimize the slow query in a specific 1C module or data composition schema using the Unica MCP tools.

Frequently Asked Questions about query-optimize

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

FAQPage Schema
How do I optimize a slow 1C query or СКД report?▼

Extract the exact query text with unica.code.search or unica.dcs.info, inspect the execution context with unica.code.outline, then optimize one cause at a time: filters before joins, virtual table parameters, and temporary table materialization.

How to fix virtual table performance in 1C queries?▼

Pass precise parameters to virtual tables instead of reading broadly and post-filtering. The Skill checks that filters like date and organization are applied as early as the platform query allows.

Does this work with PostgreSQL and MS SQL Server backends?▼

Yes, but each DBMS is treated as a separate evidence model. Conclusions about indexes, locks, and deadlocks are tied to the specific DBMS and are not generalized across platforms.

Can it detect query-in-loop performance problems?▼

Yes, unica.code.graph is used to find callers and callees when a query sits inside reusable APIs, background jobs, or event handlers, revealing repeated queries in loops that should be removed or justified.

When should I not rewrite a 1C query based on this analysis?▼

Avoid rewrites that depend on data volume without real trace or log evidence, and never replace РАЗРЕШЕННЫЕ blindly since query changes must preserve rights semantics.