Data Builder Visual Reporting API Platform For Perfex CRM Scaled

Perfex CRM Reporting Speed: Data Builder Cache & Index Advisor Guide

Multi-table Perfex CRM reports spanning hundreds of thousands of invoices, tasks, and custom fields quickly stall dashboards when every page load re-runs unindexed JOINs and GROUP BY queries. Data Builder eliminates query bottlenecks with two complementary engines: fine-grained server-side query caching and an automated SQL Index Advisor.

Follow this performance playbook to configure per-view Cache TTLs, manage caching in bulk from Cache Manager, and apply 1-click database indexes safely.

Optimization ToolWhere to ConfigureMeasured Operational Impact
Per-View Query CacheBuilder UI > Options > Cache TTL (1-1440 min)Serves cached datasets with near-zero SQL overhead
Centralized Cache ManagerData Builder > Cache ManagerBulk enable, disable, or purge caches across all views
Admin Force RefreshClear Cache button (Admin UI & Embeds)Rebuilds stale snapshots on demand for live staff
Index AdvisorView Builder Toolbar > Index AdvisorInspects JOIN, WHERE, GROUP BY with 1-Click Create Index

Step 1: Tune Query Caching and Centralized Cache Manager

Before tuning cache lifetimes, confirm your module setup matches the Data Builder installation and configuration guide. Data Builder uses fine-grained file caching inside Perfex CRM so repeated loads of heavy executive views return pre-computed rows instead of scanning MySQL or MariaDB repeatedly.

  • Open any complex view in the Builder UI, toggle query caching ON, and set Cache Expiry Time (Minutes) between 1 and 1440 (for example, 5 minutes for live sales views or 60 minutes for monthly finance summaries).
  • Navigate to Cache Manager (data_builder/cache_manager) to view every report’s public status, cache flag, and TTL in one table.
  • Use bulk actions to enable caching across all public reports or purge all stale cache files immediately after importing bulk accounting records.
  • Click the Clear Cache button on Admin views or public embeds (visible only to logged-in staff) whenever you need an instant live refresh.

Step 2: Run Index Advisor on Slow JOIN and GROUP BY Queries

Caching hides slow cold-start queries, while Index Advisor fixes the underlying database execution plan so both uncached queries and multi-chart reporting dashboards stay fast under load. Ensure staff managing schemas and caches hold appropriate Data Builder permissions.

  • Open a slow report in the Builder and click the Index Advisor button in the top toolbar.
  • Review the analyzed columns extracted automatically from your active JOIN keys, WHERE filters, and GROUP BY dimensions.
  • Click 1-Click Create Index on unindexed foreign keys or date columns to apply standard B-Tree indexes without leaving Perfex CRM.

Common Pitfalls and Quick Fixes

  • Updated invoice totals not visible in report: The view is still serving a valid cached snapshot. Click Clear Cache in the report header or lower cache_ttl from 60 minutes to 5 minutes.
  • Access denied when opening Cache Manager: Cache Manager requires the Data Builder manage capability. Grant manage permission to the administrator role under Perfex Staff Roles.
  • Write-heavy table slows slightly after over-indexing: Avoid indexing low-cardinality boolean flags; prioritize high-selectivity JOIN foreign keys, status codes, and date columns flagged by Index Advisor.

Frequently Asked Questions

How does Data Builder’s Cache TTL work on filtered reports?

Data Builder computes a unique cache key per view configuration, active filter parameters, and pagination state, saving serialized results for your configured cache_ttl duration (1 to 1,440 minutes). Subsequent requests matching those parameters read straight from cache without re-running SQL queries.

Is 1-Click Create Index in Index Advisor safe for live Perfex databases?

Yes. Index Advisor only proposes additive secondary indexes on columns used inside your view’s JOIN, WHERE, and GROUP BY clauses without altering table schemas, column types, or row data. Always run index creation during normal low-traffic windows on multi-million-row tables.

Can clients clear cache on public embedded reports?

No. While public embeds support high-speed cached rendering for external viewers, the Force Refresh Clear Cache button only renders when is_staff_logged_in() evaluates true. This security check prevents anonymous visitors from bypassing cache protection and triggering repeated database scans under heavy external traffic.

Where can I test Data Builder’s Cache Manager and Index Advisor?

You can explore the View Builder toolbar, Index Advisor suggestions, centralized Cache Manager bulk controls, per-view TTL expiry inputs, and multi-chart reporting engine on the Data Builder for Perfex CRM showcase page before installing the module in your production CRM workspace.


Comments

Leave a Reply

Your email address will not be published.Required fields are marked *