Skip to main content

Performance and limits

Map performance, SQL calculation time and background-job duration are separate concerns. Start from a measured slow action rather than increasing every limit.

Map requests​

Low-zoom density aggregation reduces data transferred to the browser. At larger scales, per-group caps and simplified geometries bound detailed display. The total count can exceed displayed features; increasing the cap can make the map slower without improving data completeness.

Compare equivalent territory, filters, zoom and user rights. Large footprints and broad object/rule conditions can increase SQL work even when only a few features are ultimately returned.

Diagnose SQL work​

For a slow background job, inspect active queries and blockers using an appropriately authorised database account. An active query with no blocker can simply be computing. An active DELETE may spend significant time maintaining referential integrity if referencing columns lack useful indexes.

SELECT pid, application_name, state,
now() - query_start AS duration,
wait_event_type, wait_event,
pg_blocking_pids(pid) AS blockers,
left(query, 500) AS query
FROM pg_stat_activity
WHERE datname = current_database()
AND state <> 'idle'
AND pid <> pg_backend_pid()
ORDER BY query_start;

Query text can contain sensitive information: redact it before sharing. Use a query plan to establish missing indexes or expensive conditions; do not run write queries with EXPLAIN ANALYZE casually, since they execute.

Segmentation cost​

Segmentation rebuilds a derived dataset and performs a transactional replacement. Source/target indexes, foreign keys, row volumes and storage speed affect its duration. The job logs each construction/publication stage. Check-only performs substantial work and rollback, so its duration can resemble a real publication.

Do not solve a slow publication by disabling integrity constraints or replacing transactional publication with unrelated partial updates. First identify the slow statement and whether it is blocked.

Bounded integration​

The root limit bounds selection work. The persistent cursor advances across candidates, including when some are blocked. A small successful batch does not mean the entire queue is empty; inspect later runs and blocker totals.

Preserve run artifacts while diagnosing. Do not use uncontrolled automatic retries to improve throughput after an uncertain append. Correctness takes precedence over clearing a counter.