Public source validation / validate (push) Failing after 3m8s
17 lines
685 B
SQL
17 lines
685 B
SQL
CREATE INDEX IF NOT EXISTS entities_type_canonical_idx
|
|
ON entities (entity_type, canonical_name, id)
|
|
WHERE tombstoned_at IS NULL;
|
|
|
|
CREATE INDEX IF NOT EXISTS entities_status_canonical_idx
|
|
ON entities (status, canonical_name, id)
|
|
WHERE tombstoned_at IS NULL;
|
|
|
|
CREATE INDEX IF NOT EXISTS entity_relations_source_entity_idx
|
|
ON entity_relations (source_entity_id, relation_type, target_entity_id);
|
|
|
|
CREATE INDEX IF NOT EXISTS entity_relations_target_entity_idx
|
|
ON entity_relations (target_entity_id, relation_type, source_entity_id);
|
|
|
|
CREATE INDEX IF NOT EXISTS entity_facts_freshness_idx
|
|
ON entity_facts (entity_id, valid_until, field_name, observed_at DESC);
|