apoc.warmup.run

This procedure is not considered safe to run from multiple threads. It is therefore not supported by the parallel runtime (introduced in Neo4j 5.13). For more information, see the Cypher Manual → Parallel runtime.

Details

Syntax

apoc.warmup.run([ loadProperties, loadDynamicProperties, loadIndexes ]) :: (pageSize, totalTime, transactionWasTerminated, nodesPerPage, nodesTotal, nodePages, nodesTime, relsPerPage, relsTotal, relPages, relsTime, relGroupsPerPage, relGroupsTotal, relGroupPages, relGroupsTime, propertiesLoaded, dynamicPropertiesLoaded, propsPerPage, propRecordsTotal, propPages, propsTime, stringPropsPerPage, stringPropRecordsTotal, stringPropPages, stringPropsTime, arrayPropsPerPage, arrayPropRecordsTotal, arrayPropPages, arrayPropsTime, indexesLoaded, indexPages, indexTime)

Description

Loads all NODE and RELATIONSHIP values in the database into memory.

Input arguments

Name

Type

Description

loadProperties

BOOLEAN

loadProperties = false :: BOOLEAN The default is: false.

loadDynamicProperties

BOOLEAN

loadDynamicProperties = false :: BOOLEAN The default is: false.

loadIndexes

BOOLEAN

loadIndexes = false :: BOOLEAN The default is: false.

Return arguments

Name

Type

Description

pageSize

INTEGER

pageSize :: INTEGER

totalTime

INTEGER

totalTime :: INTEGER

transactionWasTerminated

BOOLEAN

transactionWasTerminated :: BOOLEAN

nodesPerPage

INTEGER

nodesPerPage :: INTEGER

nodesTotal

INTEGER

nodesTotal :: INTEGER

nodePages

INTEGER

nodePages :: INTEGER

nodesTime

INTEGER

nodesTime :: INTEGER

relsPerPage

INTEGER

relsPerPage :: INTEGER

relsTotal

INTEGER

relsTotal :: INTEGER

relPages

INTEGER

relPages :: INTEGER

relsTime

INTEGER

relsTime :: INTEGER

relGroupsPerPage

INTEGER

relGroupsPerPage :: INTEGER

relGroupsTotal

INTEGER

relGroupsTotal :: INTEGER

relGroupPages

INTEGER

relGroupPages :: INTEGER

relGroupsTime

INTEGER

relGroupsTime :: INTEGER

propertiesLoaded

BOOLEAN

propertiesLoaded :: BOOLEAN

dynamicPropertiesLoaded

BOOLEAN

dynamicPropertiesLoaded :: BOOLEAN

propsPerPage

INTEGER

propsPerPage :: INTEGER

propRecordsTotal

INTEGER

propRecordsTotal :: INTEGER

propPages

INTEGER

propPages :: INTEGER

propsTime

INTEGER

propsTime :: INTEGER

stringPropsPerPage

INTEGER

stringPropsPerPage :: INTEGER

stringPropRecordsTotal

INTEGER

stringPropRecordsTotal :: INTEGER

stringPropPages

INTEGER

stringPropPages :: INTEGER

stringPropsTime

INTEGER

stringPropsTime :: INTEGER

arrayPropsPerPage

INTEGER

arrayPropsPerPage :: INTEGER

arrayPropRecordsTotal

INTEGER

arrayPropRecordsTotal :: INTEGER

arrayPropPages

INTEGER

arrayPropPages :: INTEGER

arrayPropsTime

INTEGER

arrayPropsTime :: INTEGER

indexesLoaded

BOOLEAN

indexesLoaded :: BOOLEAN

indexPages

INTEGER

indexPages :: INTEGER

indexTime

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;
Results
friends

10001

CALL apoc.warmup.run()
YIELD nodesTotal, nodePages, relsTotal, relPages, propPages, propertiesLoaded
RETURN nodesTotal, nodePages, relsTotal, relPages, propPages, propertiesLoaded;
Results
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;
Results
nodesTotal nodePages relsTotal relPages propPages propertiesLoaded

10002

184

10001

417

503

TRUE

This procedure can only be used with a Database record format of standard, aligned or high_limit. The record format is set using the Neo4j configuration setting db.format.