Slow SQL query performance after integrating external data source with ThingWorx mashups

creatortech
Sat, 07 Jun 2025 08:23:59 +0000

We integrated an external SQL Server database with ThingWorx 9.7 to display historical production data in mashup dashboards. Queries are extremely slow (15-30 seconds), making dashboards unusable. The database contains 5 million+ records of production metrics.

We’re using a Database Thing connected to SQL Server and executing direct SQL queries from mashup data services. No pagination is implemented - queries return all matching records which can be thousands of rows.

SELECT * FROM ProductionMetrics
WHERE timestamp >= '2025-01-01'
AND line_id = 'LINE-001'

How do we optimize SQL query performance for large datasets in ThingWorx? We need guidance on implementing result pagination and improving overall mashup dashboard performance when displaying data from external databases.