Thanks for using MS Q&A platform and posting your query.
Based on your requirements, ADX (Azure Data Explorer) seems like a suitable choice for migrating your time series table from Azure SQL Database (Hyperscale tier).
Here's a detailed response to your questions:
Is ADX suitable for this?
Yes, ADX is designed for handling large-scale time series data and provides features that align with your requirements, such as:
- High-performance ingestion and query capabilities
- Support for time series data with high granularity (10-second intervals)
- Efficient data retention and purging mechanisms
- Ability to handle large amounts of data (200 billion rows)
Should we go with a single, multi-tenant database or one per tenant?
Considering your expansion plans and the varying number of devices per tenant, a single, multi-tenant database might be a better choice. This approach allows for:
- Simplified management and maintenance
- Better resource utilization
- Easier scalability
However, if you anticipate significant performance or security concerns, you may want to consider a separate database per tenant.
Should we partition by DeviceId and/or Timestamp, or introduce a new TenantId column (if single db)?
Partitioning by DeviceId
and Timestamp
can improve query performance. You can use a combination of both columns as the partition key. Introducing a new TenantId
column can help with data organization and filtering, but it might not be necessary if DeviceId
is unique across all tenants.
What kind of partitioning? Hash, uniform range?
Uniform range partitioning might be a better choice for your use case, as it allows for efficient querying and data retrieval based on the Timestamp
column. Hash partitioning can lead to hotspots and reduced performance.
Is the InsertedAt column needed when we have ingestion_time()?
You can use the ingestion_time()
function to track the ingestion time, making the InsertedAt
column redundant. However, if you need to store the original insertion time for auditing or other purposes, you may want to keep the InsertedAt
column.
Hope this helps. Do let us know if you any further queries.
If this answers your query, do click Accept Answer
and Yes
for was this answer helpful. And, if you have any further query do let us know.