add database index for node ids to increase performance
This commit is contained in:
parent
f4a67e3795
commit
9344d9d6e7
2 changed files with 7 additions and 0 deletions
|
|
@ -0,0 +1,5 @@
|
||||||
|
-- CreateIndex
|
||||||
|
CREATE INDEX `neighbour_infos_node_id_idx` ON `neighbour_infos`(`node_id`);
|
||||||
|
|
||||||
|
-- CreateIndex
|
||||||
|
CREATE INDEX `nodes_node_id_idx` ON `nodes`(`node_id`);
|
||||||
|
|
@ -36,6 +36,7 @@ model Node {
|
||||||
|
|
||||||
@@index(created_at)
|
@@index(created_at)
|
||||||
@@index(updated_at)
|
@@index(updated_at)
|
||||||
|
@@index(node_id)
|
||||||
@@map("nodes")
|
@@map("nodes")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -77,6 +78,7 @@ model NeighbourInfo {
|
||||||
|
|
||||||
@@index(created_at)
|
@@index(created_at)
|
||||||
@@index(updated_at)
|
@@index(updated_at)
|
||||||
|
@@index(node_id)
|
||||||
@@map("neighbour_infos")
|
@@map("neighbour_infos")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue