Fix index creating bugs for PostgreSQL AGE graph storage
This commit is contained in:
@@ -1086,9 +1086,11 @@ class PGGraphStorage(BaseGraphStorage):
|
||||
# 分别执行每个语句,忽略错误
|
||||
queries = [
|
||||
f"SELECT create_graph('{self.graph_name}')",
|
||||
f'CREATE INDEX CONCURRENTLY vertex_p_idx ON {self.graph_name}."_ag_label_vertex" (id)',
|
||||
f"SELECT create_vlabel('{self.graph_name}', 'base');",
|
||||
f"SELECT create_elabel('{self.graph_name}', 'DIRECTED');",
|
||||
# f'CREATE INDEX CONCURRENTLY vertex_p_idx ON {self.graph_name}."_ag_label_vertex" (id)',
|
||||
f'CREATE INDEX CONCURRENTLY vertex_idx_node_id ON {self.graph_name}."_ag_label_vertex" (ag_catalog.agtype_access_operator(properties, \'"entity_id"\'::agtype))',
|
||||
f'CREATE INDEX CONCURRENTLY edge_p_idx ON {self.graph_name}."_ag_label_edge" (id)',
|
||||
# f'CREATE INDEX CONCURRENTLY edge_p_idx ON {self.graph_name}."_ag_label_edge" (id)',
|
||||
f'CREATE INDEX CONCURRENTLY edge_sid_idx ON {self.graph_name}."_ag_label_edge" (start_id)',
|
||||
f'CREATE INDEX CONCURRENTLY edge_eid_idx ON {self.graph_name}."_ag_label_edge" (end_id)',
|
||||
f'CREATE INDEX CONCURRENTLY edge_seid_idx ON {self.graph_name}."_ag_label_edge" (start_id,end_id)',
|
||||
|
Reference in New Issue
Block a user