Community Tip - Did you get an answer that solved your problem? Please mark it as an Accepted Solution so others with the same problem can find the answer easily. X
Select the right database to use with your ThingWorx installation.
When you develop an application with ThingWorx, you must save the configuration data that defines the data model and the user interface. You also need to store the dynamic data that is generated by devices at runtime (such as temperature or location).
ThingWorx uses the term Persistence Provider to refer to any type of service that saves application data, usually it is a database.
When your application moves into production you must choose and configure a Persistence Provider that meets your requirements.
NOTE: The estimated time to complete this guide is 30 minutes
There are many factors that will influence your decision for which Persistence Provider to use with your ThingWorx instance. On this page we compare and contrast different methods and provide examples for where each one is a natural fit.
Persistence Provider Typical Use
H2 | Bundled with ThingWorx server for proof-of-concept trials |
PostgreSQL | Standard production database for use up to 15,000 Property writes per second |
InfluxDB | High volume data ingestion (>25,000 property writes per second) into one database |
Microsoft SQL Server | SQL database available from Microsoft in a dozen different editions |
Azure SQL Server | SQL database managed by Microsoft in Azure |
When ThingWorx is installed with default configurations, it uses the embedded H2 database as its Persistence Provider. This configuration is suitable for evaluations and proof-of-concept applications with a limited number of Things. Before an application is used in production, you must provision a more capable persistence provider. The available options for Persistence Provider are summarized below.
Pros Cons Typical Use Case DBA Skills Required Cost
No Database set-up required | Not for use in production | Start testing ThingWorx with no additional configuration | None | No additional cost |
H2 is an open source, full-featured relational database that is embedded in the ThingWorx Foundation server. No additional database set-up is required before developing a proof-of-concept application with ThingWorx. Using H2 should provide satisfactory performance for applications with less than 1000 Things.
WARNING: Due to the inability to back-up and recover the database, H2 should never be used in production.
Pros Cons Typical Use Case DBA Skills Required Cost
Widely used database | Requires some configuration | Workhorse database appropriate for many applications | Basic SQL skills | No additional cost |
PostgreSQL is the default choice for ThingWorx cloud hosting servers. It complies with many database standards and is open source with no extra license fee required. It can be configured for high availability to minimize the chance of down-time or data loss. It has been tested up to 15,000 property writes per second and depending on other factors may give satisfactory performance up to 25,000 writes per second.
Learn more about using PostgreSQL:
Pros Cons Typical Use Case DBA Skills Required License Cost
Handle high volume data ingestion | InfluxDB is not supported as a Property provider | Application requiring >25,000 Property writes/second | Professional services likely required | Multi-node requires license fee |
If your system intensively deals with time series data and your implementation heavily depends on Value Streams or Streams for persistence/retrieval of data, we recommend using InfluxDB as the Persistence Provider in ThingWorx. InfluxDB is a high-performance data store written specifically for time series data and is a good choice when high volume data ingestion of more than 25,000 property writes per second must be saved into one database.
Learn more about InfluxDB:
Pros Cons Typical Use Case DBA Skills Required Cost
Available in multiple editions | Only runs on Windows | Data stored in Microsoft SQL Server | Configure settings | License fee required |
More than a dozen different versions of Microsoft SQL Server are used by customers for workloads ranging from small single-machine applications to large enterprise applications. Connecting ThingWorx to an existing Microsoft SQL Server can make that data readily available to use in ThingWorx Mashups.
Learn more about using Microsoft SQL Server:
Pros Cons Typical Use Case DBA Skills Required Cost
Cloud deployment and scaling | No on-premise option | Data stored in Microsoft SQL Server | Configure settings | Subscription required |
Fully managed database service operated and updated by Microsoft
Learn more about using Microsoft SQL Server:
Congratulations! You've successfully completed the Compare Persistence Providers guide.
At this point, you can make an educated decision regarding which Persistence Provider is best suited for your ThingWorx application development environment.
We recommend the following resources to continue your learning experience:
Capability Guide
Connect | ThingWorx Application Development Reference |
Build | Get Started with ThingWorx for IoT |
Experience | Create Your Application UI |
If you have questions, issues, or need additional information, refer to:
Resource Link
Community | Developer Community Forum |
Support | Microsoft SQL Technical Support |
Support | Persistence Provider Help Center |