apoc.warmup.run
Procedure APOC Core
apoc.warmup.run(loadProperties=false,loadDynamicProperties=false,loadIndexes=false) - quickly loads all nodes and rels into memory by skipping one page at a time
Signature
apoc.warmup.run(loadProperties = false :: BOOLEAN?, loadDynamicProperties = false :: BOOLEAN?, loadIndexes = false :: BOOLEAN?) :: (pageSize :: INTEGER?, totalTime :: INTEGER?, transactionWasTerminated :: BOOLEAN?, nodesPerPage :: INTEGER?, nodesTotal :: INTEGER?, nodePages :: INTEGER?, nodesTime :: INTEGER?, relsPerPage :: INTEGER?, relsTotal :: INTEGER?, relPages :: INTEGER?, relsTime :: INTEGER?, relGroupsPerPage :: INTEGER?, relGroupsTotal :: INTEGER?, relGroupPages :: INTEGER?, relGroupsTime :: INTEGER?, propertiesLoaded :: BOOLEAN?, dynamicPropertiesLoaded :: BOOLEAN?, propsPerPage :: INTEGER?, propRecordsTotal :: INTEGER?, propPages :: INTEGER?, propsTime :: INTEGER?, stringPropsPerPage :: INTEGER?, stringPropRecordsTotal :: INTEGER?, stringPropPages :: INTEGER?, stringPropsTime :: INTEGER?, arrayPropsPerPage :: INTEGER?, arrayPropRecordsTotal :: INTEGER?, arrayPropPages :: INTEGER?, arrayPropsTime :: INTEGER?, indexesLoaded :: BOOLEAN?, indexPages :: INTEGER?, indexTime :: INTEGER?)
Input parameters
Name | Type | Default |
---|---|---|
loadProperties |
BOOLEAN? |
false |
loadDynamicProperties |
BOOLEAN? |
false |
loadIndexes |
BOOLEAN? |
false |
Output parameters
Name | Type |
---|---|
pageSize |
INTEGER? |
totalTime |
INTEGER? |
transactionWasTerminated |
BOOLEAN? |
nodesPerPage |
INTEGER? |
nodesTotal |
INTEGER? |
nodePages |
INTEGER? |
nodesTime |
INTEGER? |
relsPerPage |
INTEGER? |
relsTotal |
INTEGER? |
relPages |
INTEGER? |
relsTime |
INTEGER? |
relGroupsPerPage |
INTEGER? |
relGroupsTotal |
INTEGER? |
relGroupPages |
INTEGER? |
relGroupsTime |
INTEGER? |
propertiesLoaded |
BOOLEAN? |
dynamicPropertiesLoaded |
BOOLEAN? |
propsPerPage |
INTEGER? |
propRecordsTotal |
INTEGER? |
propPages |
INTEGER? |
propsTime |
INTEGER? |
stringPropsPerPage |
INTEGER? |
stringPropRecordsTotal |
INTEGER? |
stringPropPages |
INTEGER? |
stringPropsTime |
INTEGER? |
arrayPropsPerPage |
INTEGER? |
arrayPropRecordsTotal |
INTEGER? |
arrayPropPages |
INTEGER? |
arrayPropsTime |
INTEGER? |
indexesLoaded |
BOOLEAN? |
indexPages |
INTEGER? |
indexTime |
INTEGER? |
Usage Examples
The examples in this section are based on the following sample graph:
MERGE (michael:Person {name: "Michael"})
WITH michael
CALL {
WITH michael
UNWIND range(0, 10000) AS id
MERGE (p:Person {name: "Person" + id})
MERGE (michael)-[:KNOWS]-(p)
RETURN count(*) AS friends
}
RETURN friends;
friends |
---|
10001 |
CALL apoc.warmup.run()
YIELD nodesTotal, nodePages, relsTotal, relPages, propPages, propertiesLoaded
RETURN nodesTotal, nodePages, relsTotal, relPages, propPages, propertiesLoaded;
nodesTotal | nodePages | relsTotal | relPages | propPages | propertiesLoaded |
---|---|---|---|---|---|
10002 |
184 |
10001 |
417 |
503 |
FALSE |
CALL apoc.warmup.run(true, true, false)
YIELD nodesTotal, nodePages, relsTotal, relPages, propPages, propertiesLoaded
RETURN nodesTotal, nodePages, relsTotal, relPages, propPages, propertiesLoaded;
nodesTotal | nodePages | relsTotal | relPages | propPages | propertiesLoaded |
---|---|---|---|---|---|
10002 |
184 |
10001 |
417 |
503 |
TRUE |