Graph workspaces using system managed indexes
Systems and methods described herein relate to automatic creation and management of indexes for graph workspaces. Missing indexes for a graph workspace are identified and automatically created as appropriate. The automatically created indexes are reused for other graph workspaces working on the same set of data. The automatic creation and management of indexes for graph workspaces allows for a graph workspace to be created with a single user command instead of multiple user commands involving creation of indexes prior to creation of the graph workspace.
1 . A system comprising:
at least one memory that stores instructions; and
one or more processors configured by the instructions to perform operations comprising:
receiving a first user command to create a first graph workspace for a first set of data;
determining a first missing index on the first set of data for the first graph workspace;
automatically creating a first automatically created index on the first set of data for the first graph workspace based on the first missing index; and
creating the first graph workspace referencing the first automatically created index.
2 . The system of claim 1 , the operations further comprising:
receiving a second user command to drop the first graph workspace;
identifying a number of second graph workspaces referencing the first automatically created index; and
dropping the first automatically created index based on the number of second graph workspaces referencing the first automatically created index being less than a threshold number.
3 . The system of claim 2 , wherein identifying the number of second graph workspace s comprises:
iterating through data objects defined for the first set of data; and
incrementing a counter for each data object of the data objects that references the first automatically created index.
4 . The system of claim 1 , the operations further comprising:
receiving a second user command to create a second graph workspace for the first set of data;
identifying the first automatically created index on the first set of data; and
creating the second graph workspace referencing the first automatically created index.
5 . The system of claim 1 , the operations further comprising:
determining a first existing index on the first set of data for the first graph workspace, the first existing index not being identified in the first user command; and
causing the first graph workspace to reference the first existing index and the first automatically created index.
6 . The system of claim 1 , wherein the first automatically created index identifies vertices in the first set of data, the operations further comprising:
automatically creating a second automatically created index, the second automatically created index identifying connections between the vertices in the first set of data, the second automatically created index referencing the first automatically created index; and
causing the first graph workspace to reference the first automatically created index and the second automatically created index.
7 . The system of claim 1 , the operations further comprising:
receiving a second user command to replace the first graph workspace with a second graph workspace for a second set of data;
determining a second missing index on the second set of data for the second graph workspace;
automatically creating a second automatically created index on the second set of data for the second graph workspace based on the second missing index;
creating the second graph workspace referencing the second automatically created index; and
dropping the first graph workspace and the first automatically created index.
8 . The system of claim 1 , the operations further comprising:
receiving a second user command to export the first graph workspace; and
generating a binary comprising the first graph workspace and the first set of data, the binary excluding the first automatically created index.
9 . The system of claim 1 , the operations further comprising:
receiving a second user command to import a second graph workspace;
receiving a binary comprising the second graph workspace and a second set of data;
determining a second missing index in the binary; and
automatically creating a second automatically created index on the second set of data, the second graph workspace referencing the second automatically created index.
10 . The system of claim 1 , the operations further comprising:
locking the first set of data based on the first automatically created index; and
unlocking the first set of data based on the first automatically created index being created.
11 . The system of claim 1 , the operations further comprising:
determining a user who provided the first user command has privileges to create indexes on the first set of data, wherein creating the first graph workspace is based on the user having the privileges to create indexes on the first set of data.
12 . The system of claim 1 , the operations further comprising:
determining a user who provided the first user command does not have privileges to drop indexes on the first set of data; and
denying a second user command to replace the first graph workspace with a second graph workspace for a second set of data.
13 . The system of claim 1 , wherein the first automatically created index follows a naming scheme identifying the first automatically created index as a system index.
14 . A method comprising:
receiving a first user command to create a first graph workspace for a first set of data;
determining a first missing index on the first set of data for the first graph workspace;
automatically creating a first automatically created index on the first set of data for the first graph workspace based on the first missing index; and
creating the first graph workspace referencing the first automatically created index.
15 . The method of claim 14 , further comprising:
receiving a second user command to drop the first graph workspace;
identifying a number of second graph workspaces referencing the first automatically created index; and
dropping the first automatically created index based on the number of second graph workspaces referencing the first automatically created index being less than a threshold number.
16 . The method of claim 15 , wherein identifying the number of second graph workspaces comprises:
iterating through data objects defined for the first set of data; and
incrementing a counter for each data object of the data objects that references the first automatically created index.
17 . The method of claim 14 , further comprising:
receiving a second user command to create a second graph workspace for the first set of data;
identifying the first automatically created index on the first set of data; and
creating the second graph workspace referencing the first automatically created index.
18 . One or more non-transitory computer-readable media storing computer-executable instructions that, when executed by a computing system, cause the computing system to perform operations comprising:
receiving a first user command to create a first graph workspace for a first set of data;
determining a first missing index on the first set of data for the first graph workspace;
automatically creating a first automatically created index on the first set of data for the first graph workspace based on the first missing index; and
creating the first graph workspace referencing the first automatically created index.
19 . The one or more non-transitory computer-readable media of claim 18 , the operations further comprising:
receiving a second user command to drop the first graph workspace;
identifying a number of second graph workspaces referencing the first automatically created index; and
dropping the first automatically created index based on the number of second graph workspaces referencing the first automatically created index being less than a threshold number.
20 . The one or more non-transitory computer-readable media of claim 19 , wherein identifying the number of second graph workspaces comprises:
iterating through data objects defined for the first set of data; and
incrementing a counter for each data object of the data objects that references the first automatically created index.