A PostgreSQL system contains entity, record, and event data with JSONB attributes, status values, and timestamp-based access patterns. Create the recommended indexes for these workload patterns, then return their catalog definitions.
index_name and index_definition.| Column | Type | Description |
|---|---|---|
| entity_idPK | INT | Entity identifier |
| external_code | VARCHAR(40) | Unique external lookup code |
| entity_type | VARCHAR(30) | Entity classification |
| attributes | JSONB | Flexible entity attributes |
| Column | Type | Description |
|---|---|---|
| record_idPK | INT | Record identifier |
| entity_id | INT | Referenced entity |
| status | VARCHAR(20) | Record status |
| created_at | TIMESTAMP | Record creation timestamp |
| payload | JSONB | Record payload |
| Column | Type | Description |
|---|---|---|
| event_idPK | INT | Event identifier |
| record_id | INT | Referenced record |
| event_type | VARCHAR(30) | Event classification |
| occurred_at | TIMESTAMP | Event timestamp |
| details | JSONB | Event details |