What are the trade-offs between using Postgres and OpenSearch for DomainTools data retrieval needs?
Using the supplied retrieval benchmark records, write a PostgreSQL query that compares the two systems across workload types. Include latency, reliability, and average result volume so the output supports the trade-off analysis.
product_name, workload_type, benchmark_count, avg_latency_ms, p95_latency_ms, success_rate_pct, and avg_rows_returned.product_name, then workload_type.| Column | Type | Description |
|---|---|---|
| system_idPK | INT | Unique retrieval system identifier |
| product_name | VARCHAR(50) | Retrieval product name |
| environment | VARCHAR(30) | Deployment environment |
| Column | Type | Description |
|---|---|---|
| benchmark_idPK | INT | Unique benchmark observation identifier |
| system_id | INT | Referenced retrieval system |
| workload_type | VARCHAR(40) | Type of retrieval workload |
| latency_ms | DECIMAL(10,2) | Observed request latency in milliseconds |
| rows_returned | INT | Number of records returned |
| success | BOOLEAN | Whether the benchmark request succeeded |