Procedures
This page provides a complete reference to Neo4j’s built-in procedures.
For lists of deprecated and removed procedures, refer to the page Changes, deprecations, and removals in Neo4j 2025.x.
The available procedures on a server depends on several factors:
-
Neo4j Enterprise Edition provides a larger set of procedures than Neo4j Community Edition.
-
Neo4j’s APOC Core library and GenAI plugin are installed by default on Aura instances, but have to be installed separately on on-prem servers.
-
Cluster members have procedures that are not available in standalone mode.
To check which procedures are available in your Neo4j DBMS, use the Cypher command SHOW PROCEDURES
:
SHOW PROCEDURES
SHOW PROCEDURES YIELD *
Some procedures can only be run by users with Admin
privileges.
Specifically, either the EXECUTE ADMIN PROCEDURES
privilege or both the EXECUTE PROCEDURES
and EXECUTE BOOSTED PROCEDURES
privileges.
These procedures are labeled with Admin Only.
For more information, see the EXECUTE
privileges section.
Authentication and authorization
For more information, see Authentication and authorization.
dbms.security.clearAuthCache()Admin OnlyEnterprise Edition
Details
Syntax
dbms.security.clearAuthCache()
Description
Clears authentication and authorization cache.
Mode
DBMS
dbms.security.reloadTLS()Admin OnlyEnterprise EditionIntroduced in 2025.03
Details
Syntax
dbms.security.reloadTLS()
Description
Trigger the dynamic reloading of all TLS certificates and configuration.
Mode
DBMS
dbms.showCurrentUser()
DetailsSyntax
dbms.showCurrentUser() :: (username, roles, flags)
Description
Show the current user.
Return arguments
Name
Type
Description
username
STRING
The name of the current user.
roles
LIST<STRING>
The roles assigned to the current user.
flags
LIST<STRING>
The flags set on the current user.
Mode
DBMS
Background job management
For more information, see Manage background jobs.
dbms.scheduler.failedJobs()Admin OnlyEnterprise Edition
Details
Syntax
dbms.scheduler.failedJobs() :: (jobId, group, database, submitter, description, type, submitted, executionStart, failureTime, failureDescription)
Description
List failed job runs. There is a limit for amount of historical data.
Return arguments
Name
Type
Description
jobId
STRING
The id of the failed job.
group
STRING
The category of the failed job.
database
STRING
The name of the database the job failed in.
submitter
STRING
The creator of the failed job.
description
STRING
Information about the failed job.
type
STRING
The interval of the failed job.
submitted
STRING
The submission time of the failed job.
executionStart
STRING
The start time of the failed job.
failureTime
STRING
The failure time of the failed job.
failureDescription
STRING
Information about the job failure.
Mode
DBMS
This procedure is not considered safe to run from multiple threads. It is therefore not supported by the parallel runtime. For more information, see the Cypher Manual → Parallel runtime.
dbms.scheduler.groups()Admin OnlyEnterprise Edition
Details
Syntax
dbms.scheduler.groups() :: (group, threads)
Description
List the job groups that are active in the database internal job scheduler.
Return arguments
Name
Type
Description
group
STRING
The name of the job group.
threads
INTEGER
The number of active threads in that job group.
Mode
DBMS
This procedure is not considered safe to run from multiple threads. It is therefore not supported by the parallel runtime. For more information, see the Cypher Manual → Parallel runtime.
dbms.scheduler.jobs()Admin OnlyEnterprise Edition
Details
Syntax
dbms.scheduler.jobs() :: (jobId, group, submitted, database, submitter, description, type, scheduledAt, period, state, currentStateDescription)
Description
List all jobs that are active in the database internal job scheduler.
Return arguments
Name
Type
Description
jobId
STRING
The id of the job.
group
STRING
The category of the job.
submitted
STRING
The submission time of the job.
database
STRING
The name of the database the job is in.
submitter
STRING
The creator of the job.
description
STRING
Information about the job.
type
STRING
The interval of the job.
scheduledAt
STRING
The start time of the job.
period
STRING
The interval for jobs run periodically.
state
STRING
The state of the job: ('EXECUTING', 'SCHEDULED').
currentStateDescription
STRING
A description of the job state.
Mode
DBMS
This procedure is not considered safe to run from multiple threads. It is therefore not supported by the parallel runtime. For more information, see the Cypher Manual → Parallel runtime.
Change Data Capture (CDC)
For more information, see the CDC documentation.
cdc.current()Enterprise EditionDeprecated in 5.17
Details
Syntax
cdc.current() :: (id)
Description
Returns the current change identifier that can be used to stream changes from.
Return arguments
Name
Type
Description
id
STRING
The change identifier.
Mode
READ
Replaced by
cdc.earliest()Enterprise EditionDeprecated in 5.17
Details
Syntax
cdc.earliest() :: (id)
Description
Returns the earliest change identifier that can be used to stream changes from.
Return arguments
Name
Type
Description
id
STRING
The change identifier.
Mode
READ
Replaced by
cdc.query()Admin OnlyEnterprise EditionDeprecated in 5.17
Details
Syntax
cdc.query([ from selectors ]) :: (id, txId, seq, metadata, event)
Description
Query changes happened from the provided change identifier.
Input arguments
Name
Type
Description
from
STRING
The change identifier to query changes from.
selectors
LIST<MAP>
An optional list of selectors to filter out changes.
Return arguments
Name
Type
Description
id
STRING
The change identifier for this change event. Used to continue querying from this change event.
txId
INTEGER
A number identifying which transaction the change happened in, unique in combination with seq.
seq
INTEGER
A number used for ordering changes that happened in the same transaction.
metadata
MAP
Metadata from the transaction that caused this change event.
event
MAP
The retrieved changes on the affected entity.
Mode
READ
Replaced by
db.cdc.current()Enterprise Edition
Details
Syntax
db.cdc.current() :: (id)
Description
Returns the current change identifier that can be used to stream changes from.
Return arguments
Name
Type
Description
id
STRING
The change identifier.
Mode
READ
db.cdc.earliest()Enterprise Edition
Details
Syntax
db.cdc.earliest() :: (id)
Description
Returns the earliest change identifier that can be used to stream changes from.
Return arguments
Name
Type
Description
id
STRING
The change identifier.
Mode
READ
db.cdc.query()Admin OnlyEnterprise Edition
Details
Syntax
db.cdc.query([ from selectors ]) :: (id, txId, seq, metadata, event)
Description
Query changes happened from the provided change identifier.
Input arguments
Name
Type
Description
from
STRING
The change identifier to query changes from.
selectors
LIST<MAP>
An optional list of selectors to filter out changes.
Return arguments
Name
Type
Description
id
STRING
The change identifier for this change event. Used to continue querying from this change event.
txId
INTEGER
A number identifying which transaction the change happened in, unique in combination with seq.
seq
INTEGER
A number used for ordering changes that happened in the same transaction.
metadata
MAP
Metadata from the transaction that caused this change event.
event
MAP
The retrieved changes on the affected entity.
Mode
READ
db.cdc.translateId()Admin OnlyEnterprise EditionIntroduced in 2025.04
Details
Syntax
db.cdc.translateId(from :: STRING) :: (id :: STRING)
Description
Translate any provided change identifier to match the queried database.
Input arguments
Name
Type
Description
from
STRING
The change identifier to translate.
Return arguments
Name
Type
Description
id
STRING
The change identifier.
Mode
READ
Cluster management
For more information, see Clustering.
dbms.cluster.checkConnectivity()Admin OnlyEnterprise Edition
Details
Syntax
dbms.cluster.checkConnectivity([ port-name server ]) :: (serverId, name, address, mode-constraint, port-name, port-address, result)
Description
Check the connectivity of this instance to other cluster members. Not all ports are relevant to all members. Valid values for 'port-name' are: [CLUSTER, INTRA_BOLT, RAFT]
Input arguments
Name
Type
Description
port-name
STRING
The name of the port: ('CLUSTER', 'RAFT').
server
STRING
The id of the server to check connectivity of.
Return arguments
Name
Type
Description
serverId
STRING
The id of the checked server.
name
STRING
name :: STRING
address
STRING
address :: STRING
mode-constraint
STRING
The instance mode constraint of the server.
port-name
STRING
The name of the checked port.
port-address
STRING
The address of the checked port.
result
STRING
Whether the check was successful or not.
Mode
DBMS
dbms.cluster.cordonServer()Enterprise Edition
Details
Syntax
dbms.cluster.cordonServer(server)
Description
Mark a server in the topology as not suitable for new allocations. It will not force current allocations off the server. This is useful when deallocating databases when you have multiple unavailable servers.
Input arguments
Name
Type
Description
server
STRING
The name or id of the server to be cordoned.
Mode
WRITE
Required privileges
SERVER MANAGEMENT
Running the procedure with an admin privilege is deprecated.
dbms.cluster.deallocateDatabaseFromServer()Enterprise Edition
Details
Syntax
dbms.cluster.deallocateDatabaseFromServer(server, database [, dryrun ]) :: (database, fromServerName, fromServerId, toServerName, toServerId, mode)
Description
Deallocate a specific user database from a specific server.
Input arguments
Name
Type
Description
server
STRING
The id of the server to deallocate from.
database
STRING
The name of the database to deallocate.
dryrun
BOOLEAN
Set to true
to dry run the procedure.
Return arguments
Name
Type
Description
database
STRING
The name of the database.
fromServerName
STRING
The name of the server.
fromServerId
STRING
The id of the server.
toServerName
STRING
The name of the server.
toServerId
STRING
The id of the server.
mode
STRING
The mode in which the database is hosted.
Mode
WRITE
Required privileges
SERVER MANAGEMENT
dbms.cluster.deallocateDatabaseFromServers()Enterprise Edition
Details
Syntax
dbms.cluster.deallocateDatabaseFromServers(servers, database [, dryrun ]) :: (database, fromServerName, fromServerId, toServerName, toServerId, mode)
Description
Deallocate a specific user database from a list of servers.
Input arguments
Name
Type
Description
servers
LIST<STRING>
The ids of the servers to deallocate from.
database
STRING
The id of the database to deallocate.
dryrun
BOOLEAN
Set to true
to dry run the procedure.
Return arguments
Name
Type
Description
database
STRING
The name of the database.
fromServerName
STRING
The name of the server.
fromServerId
STRING
The id of the server.
toServerName
STRING
The name of the server.
toServerId
STRING
The id of the server.
mode
STRING
The mode in which the database is hosted.
Mode
WRITE
Required privileges
SERVER MANAGEMENT
dbms.cluster.deallocateNumberOfDatabases()Enterprise Edition
Details
Syntax
dbms.cluster.deallocateNumberOfDatabases(server, number [, dryrun ]) :: (database, fromServerName, fromServerId, toServerName, toServerId, mode)
Description
Deallocate a number of user databases from a specific server.
Input arguments
Name
Type
Description
server
STRING
The id of the server to deallocate from.
number
INTEGER
The number of databases to deallocate.
dryrun
BOOLEAN
Set to true
to dry run the procedure.
Return arguments
Name
Type
Description
database
STRING
The name of the database.
fromServerName
STRING
The name of the server.
fromServerId
STRING
The id of the server.
toServerName
STRING
The name of the server.
toServerId
STRING
The id of the server.
mode
STRING
The mode in which the database is hosted.
Mode
WRITE
Required privileges
SERVER MANAGEMENT
dbms.cluster.protocols()Enterprise Edition
Details
Syntax
dbms.cluster.protocols() :: (orientation, remoteAddress, applicationProtocol, applicationProtocolVersion, modifierProtocols)
Description
Overview of installed protocols
Return arguments
Name
Type
Description
orientation
STRING
Direction of the protocol (inbound or outbound).
remoteAddress
STRING
The socket address this protocol is available on.
applicationProtocol
STRING
The name of the protocol.
applicationProtocolVersion
INTEGER
The version of the protocol.
modifierProtocols
STRING
Installed modifier protocols, for example, compression.
Mode
DBMS
dbms.cluster.readReplicaToggle()Admin OnlyEnterprise EditionDeprecated in 5.6Removed in Cypher 25
Details
Syntax
dbms.cluster.readReplicaToggle(databaseName, pause) :: (state)
Description
The toggle can pause or resume read replica (deprecated in favor of dbms.cluster.secondaryReplicationDisable)
Input arguments
Name
Type
Description
databaseName
STRING
The name of the database to toggle the secondary replication process for.
pause
BOOLEAN
Whether or not to enable/disable the secondary replication process.
Return arguments
Name
Type
Description
state
STRING
The current state of the secondary replication process.
Mode
DBMS
What is it for?
You can perform a point-in-time backup, as the backup will contain only the transactions up to the point where the transaction pulling was paused. Follow these steps to do so:
-
Connect directly to the server hosting the database in secondary mode. (Neo4j Driver use
bolt://
or use the HTTP API). -
Pause transaction pulling for the specified database.
-
Back up the database, see Back up an online database.
If connected directly to a server hosting a database in secondary mode, Data Scientists can execute analysis on a specific database that is paused, the data will not unexpectedly change while performing the analysis.
This procedure can only be executed on a database that runs in a secondary role on the connected server.
neo4j
CALL dbms.cluster.readReplicaToggle("neo4j", true)
neo4j
CALL dbms.cluster.readReplicaToggle("neo4j", false)
dbms.cluster.reallocateDatabase()Enterprise Edition
Details
Syntax
dbms.cluster.reallocateDatabase(database [, dryrun ]) :: (database, fromServerName, fromServerId, toServerName, toServerId, mode)
Description
Reallocate a specific database.
Input arguments
Name
Type
Description
database
STRING
The name of the database to reallocate.
dryrun
BOOLEAN
Set to true
to dry run the procedure.
Return arguments
Name
Type
Description
database
STRING
The name of the database.
fromServerName
STRING
The name of the server.
fromServerId
STRING
The id of the server.
toServerName
STRING
The name of the server.
toServerId
STRING
The id of the server.
mode
STRING
The mode in which the database is hosted.
Mode
WRITE
Required privileges
SERVER MANAGEMENT
dbms.cluster.reallocateNumberOfDatabases()Enterprise Edition
Details
Syntax
dbms.cluster.reallocateNumberOfDatabases(number [, dryrun ]) :: (database, fromServerName, fromServerId, toServerName, toServerId, mode)
Description
Reallocate a specified number of user databases.
Input arguments
Name
Type
Description
number
INTEGER
The number of databases to reallocate.
dryrun
BOOLEAN
Set to true
to dry run the procedure.
Return arguments
Name
Type
Description
database
STRING
The name of the database.
fromServerName
STRING
The name of the server.
fromServerId
STRING
The id of the server.
toServerName
STRING
The name of the server.
toServerId
STRING
The id of the server.
mode
STRING
The mode in which the database is hosted.
Mode
WRITE
Required privileges
SERVER MANAGEMENT
dbms.cluster.recreateDatabase()Enterprise EditionDeprecated in 2025.04
Details
Syntax
dbms.cluster.recreateDatabase(database :: STRING, options = {} :: MAP)
Description
Recreates a database while keeping all RBAC settings. The procedure initiates a process, which when complete, will have synchronized and started all database instances within the cluster.
Input arguments
Name
Type
Description
database
STRING
The name of the database to recreate.
options
MAP
The seeding and topology options to use for recreating the database.
Mode
WRITE
It is mandatory to specify either seedURI
or seedingServers
as seeding options in the options
field.
If no topology option is defined, the database will be recreated with the previous topology.
Further details on how to use the dbms.recreateDatabase()
procedure are provided in the section Database administration → Recreate a database.
dbms.cluster.routing.getRoutingTable()Enterprise EditionDeprecated in 5.21
Details
Syntax
dbms.cluster.routing.getRoutingTable(context [, database ]) :: (ttl, servers)
Description
Returns the advertised bolt capable endpoints for a given database, divided by each endpoint’s capabilities. For example, an endpoint may serve read queries, write queries, and/or future getRoutingTable
requests.
Input arguments
Name
Type
Description
context
MAP
Routing context, for example, routing policies.
database
STRING
The database to get a routing table for.
Return arguments
Name
Type
Description
ttl
INTEGER
Time to live (in seconds) for the routing table.
servers
LIST<MAP>
Servers grouped by whether they are readers, writers, or routers.
Mode
DBMS
dbms.cluster.secondaryReplicationDisable()Admin Only
Details
Syntax
dbms.cluster.secondaryReplicationDisable(databaseName, pause) :: (state)
Description
The toggle can pause or resume the secondary replication process.
Input arguments
Name
Type
Description
databaseName
STRING
The name of the database to toggle the secondary replication process for.
pause
BOOLEAN
Whether or not to enable/disable the secondary replication process.
Return arguments
Name
Type
Description
state
STRING
The current state of the secondary replication process.
Mode
DBMS
What is it for?
You can perform a point-in-time backup, as the backup will contain only the transactions up to the point where the transaction pulling was paused. Follow these steps to do so:
-
Connect directly to the server hosting the database in secondary mode. (Neo4j Driver use
bolt://
or use the HTTP API). -
Pause transaction pulling for the specified database.
-
Back up the database, see Back up an online database.
If connected directly to a server hosting a database in secondary mode, Data Scientists can execute analysis on a specific database that is paused, the data will not unexpectedly change while performing the analysis.
This procedure can only be executed on a database that runs in a secondary role on the connected server.
neo4j
CALL dbms.cluster.secondaryReplicationDisable("neo4j", true)
neo4j
CALL dbms.cluster.secondaryReplicationDisable("neo4j", false)
dbms.cluster.setAutomaticallyEnableFreeServers()Enterprise Edition
Details
Syntax
dbms.cluster.setAutomaticallyEnableFreeServers(autoEnable)
Description
With this method you can set whether free servers are automatically enabled.
Input arguments
Name
Type
Description
autoEnable
BOOLEAN
Whether or not to automatically enable free servers.
Mode
WRITE
Required privileges
SERVER MANAGEMENT
Running the procedure with an admin privilege is deprecated.
dbms.cluster.statusCheck()Admin OnlyEnterprise Edition
Details
Syntax
dbms.cluster.statusCheck(databases, timeoutMilliseconds) :: (database, serverId, serverName, address, replicationSuccessful, memberStatus, recognisedLeader, recognisedLeaderTerm, requester, error)
Description
Performs a rafted status check.
Input arguments
Name
Type
Description
databases
LIST<STRING>
Databases for which the status check should run. Providing an empty list runs the status check for all clustered databases on that server, i.e. it does not run on singles or secondaries.
timeoutMilliseconds
INTEGER
Specifies the maximum wait time for replication before marking it unsuccessful. Default value is 1000 milliseconds.
Return arguments
Name
Type
Description
database
STRING
The database for which a status check entry was replicated.
serverId
STRING
The UUID of the server, which did or did not participate in a successful replication of the status check entry.
serverName
STRING
The friendly name of the server, or its UUID if no name is set.
address
STRING
The address of the Bolt port for the server.
replicationSuccessful
BOOLEAN
Indicates if the server (on which the procedure is run) can replicate a transaction.
memberStatus
STRING
The status of each primary member.
recognisedLeader
STRING
The server id of the perceived leader of each primary member.
recognisedLeaderTerm
INTEGER
The term of the perceived leader of each primary member. If the members report different leaders, the one with the highest term should be trusted.
requester
BOOLEAN
Whether a server is the requester or not.
error
STRING
Contains any error message if present. An example of an error is that one or more of the requested databases do not exist on the requester.
Mode
DBMS
dbms.cluster.uncordonServer()Enterprise EditionDeprecated in 5.23Removed in Cypher 25
Details
Syntax
dbms.cluster.uncordonServer(server)
Description
Remove the cordon on a server, returning it to 'enabled'.
Input arguments
Name
Type
Description
server
STRING
The name or id of the server to be uncordoned.
Mode
WRITE
Replaced by
Required privileges
SERVER MANAGEMENT
Running the procedure with an admin privilege is deprecated.
dbms.recreateDatabase()Enterprise EditionIntroduced in 2025.04
Details
Syntax
dbms.recreateDatabase(database :: STRING, options = {} :: MAP)
Description
Recreates a database while keeping all RBAC settings. The procedure initiates a process, which when complete, will have synchronized and started all database instances within the cluster.
Input arguments
Name
Type
Description
database
STRING
The name of the database to recreate.
options
MAP
The seeding and topology options to use for recreating the database.
Mode
WRITE
It is mandatory to specify either seedURI
, seedingServers
, or clearData
in the options
field to define what store(s) the recreation should be based on.
Further details on how to use the dbms.recreateDatabase()
procedure are provided in the related section Database administration → Recreate a database.
If no topology option is defined, the database will be recreated with the previous topology.
dbms.setDefaultAllocationNumbers()Admin OnlyEnterprise Edition
Details
Syntax
dbms.setDefaultAllocationNumbers(primaries, secondaries)
Description
With this method you can set the default number of primaries and secondaries.
Input arguments
Name
Type
Description
primaries
INTEGER
The default number of primaries.
secondaries
INTEGER
The default number of secondaries.
Mode
WRITE
dbms.showTopologyGraphConfig()Admin OnlyEnterprise Edition
Details
Syntax
dbms.showTopologyGraphConfig() :: (allocator, defaultPrimariesCount, defaultSecondariesCount, defaultDatabase, autoEnableFreeServers)
Description
With this method the configuration of the Topology Graph can be displayed.
Return arguments
Name
Type
Description
allocator
STRING
The name of the allocator.
defaultPrimariesCount
INTEGER
The default number of primaries.
defaultSecondariesCount
INTEGER
The default number of secondaries.
defaultDatabase
STRING
The name of the default database.
autoEnableFreeServers
BOOLEAN
Whether or not to automatically enable free servers.
Mode
READ
Starting with Neo4j 2025.04, the default database can also be set to a local or remote database alias.
Configuration and DBMS info
For more information, see Configuration.
dbms.checkConfigValue()Admin OnlyEnterprise Edition
Details
Syntax
dbms.checkConfigValue(setting, value) :: (valid, message)
Description
Check if a potential config setting value is valid.
Input arguments
Name
Type
Description
setting
STRING
The name of the setting.
value
STRING
The setting value to verify.
Return arguments
Name
Type
Description
valid
BOOLEAN
Whether or not the setting value is valid.
message
STRING
Details about the outcome of the procedure.
Mode
DBMS
This procedure is not considered safe to run from multiple threads. It is therefore not supported by the parallel runtime. For more information, see the Cypher Manual → Parallel runtime.
dbms.components()
DetailsSyntax
dbms.components() :: (name, versions, edition)
Description
List DBMS components and their versions.
Return arguments
Name
Type
Description
name
STRING
The name of the component.
versions
LIST<STRING>
The installed versions of the component.
edition
STRING
The Neo4j edition of the DBMS.
Mode
DBMS
As of Neo4j 2025.05, dbms.components()
returns the supported Cypher versions in a row where the name
column has the value "Cypher"
.
As of Neo4j 2025.06, the row has the value ["5", "25"]
, indicating that both Cypher 5 and Cypher 25 are supported from this release onward.
For more information about Cypher versions, see the Cypher Manual → Select Cypher version.
dbms.info()
DetailsSyntax
dbms.info() :: (id, name, creationDate)
Description
Provides information regarding the DBMS.
Return arguments
Name
Type
Description
id
STRING
The id of the DBMS.
name
STRING
The name of the DBMS.
creationDate
STRING
The creation date of the DBMS.
Mode
DBMS
dbms.listCapabilities()
DetailsSyntax
dbms.listCapabilities() :: (name, description, value)
Description
List capabilities.
Return arguments
Name
Type
Description
name
STRING
The full name of the capability (e.g. "dbms.instance.version").
description
STRING
The capability description (e.g. "Neo4j version this instance is running").
value
ANY
The capability object if it is present in the system (e.g. "5.20.0").
Mode
DBMS
dbms.listConfig()Admin Only
Details
Syntax
dbms.listConfig([ searchString ]) :: (name, description, value, dynamic, defaultValue, startupValue, explicitlySet, validValues)
Description
List the currently active configuration settings of Neo4j.
Input arguments
Name
Type
Description
searchString
STRING
A string that filters on the name of config settings.
Return arguments
Name
Type
Description
name
STRING
The name of the setting.
description
STRING
The description of the setting.
value
STRING
The set value of the setting.
dynamic
BOOLEAN
If the setting can be set dynamically or not.
defaultValue
STRING
The default value of the setting.
startupValue
STRING
The value of the setting when the database started.
explicitlySet
BOOLEAN
Whether or not the setting was explicitly set.
validValues
STRING
A description of the valid values.
Mode
DBMS
dbms.setConfigValue()Admin OnlyEnterprise EditionNot available on Aura
Details
Syntax
dbms.setConfigValue(setting, value)
Description
Update a given setting value. Passing an empty value results in removing the configured value and falling back to the default value. Changes do not persist and are lost if the server is restarted. In a clustered environment, dbms.setConfigValue
affects only the cluster member it is run against.
Input arguments
Name
Type
Description
setting
STRING
The name of the setting.
value
STRING
The value to set.
Mode
DBMS
dbms.listPools()Enterprise Edition
Details
Syntax
dbms.listPools() :: (pool, databaseName, heapMemoryUsed, heapMemoryUsedBytes, nativeMemoryUsed, nativeMemoryUsedBytes, freeMemory, freeMemoryBytes, totalPoolMemory, totalPoolMemoryBytes)
Description
List all memory pools, including sub pools, currently registered at this instance that are visible to the user.
Return arguments
Name
Type
Description
pool
STRING
The name of the memory pool.
databaseName
STRING
The name of the database.
heapMemoryUsed
STRING
The amount of heap memory used.
heapMemoryUsedBytes
STRING
The amount of heap memory used in bytes.
nativeMemoryUsed
STRING
The amount of native memory used.
nativeMemoryUsedBytes
STRING
The amount of native memory used in bytes.
freeMemory
STRING
The amount of free memory.
freeMemoryBytes
STRING
The amount of free memory in bytes.
totalPoolMemory
STRING
The total pool memory.
totalPoolMemoryBytes
STRING
The total pool memory in bytes.
Mode
DBMS
This procedure is not considered safe to run from multiple threads. It is therefore not supported by the parallel runtime. For more information, see the Cypher Manual → Parallel runtime.
Connection management
For more information, see Manage connections.
dbms.listConnections()
DetailsSyntax
dbms.listConnections() :: (connectionId, connectTime, connector, username, userAgent, serverAddress, clientAddress)
Description
List all accepted network connections at this instance that are visible to the user.
Return arguments
Name
Type
Description
connectionId
STRING
The id of the connection.
connectTime
STRING
The time the connection was established, formatted according to the ISO-8601 Standard.
connector
STRING
The protocol of the connector.
username
STRING
The username of the connected user.
userAgent
STRING
The active agent.
serverAddress
STRING
The address of the connected server.
clientAddress
STRING
The address of the connected client.
Mode
DBMS
dbms.killConnection()
DetailsSyntax
dbms.killConnection(id) :: (connectionId, username, message)
Description
Kill network connection with the given connection id.
Input arguments
Name
Type
Description
id
STRING
The id of the connection to kill.
Return arguments
Name
Type
Description
connectionId
STRING
The id of the connection killed.
username
STRING
The username of the user of the killed connection.
message
STRING
Details about the outcome of the procedure.
Mode
DBMS
dbms.killConnections()
DetailsSyntax
dbms.killConnections(ids) :: (connectionId, username, message)
Description
Kill all network connections with the given connection ids.
Input arguments
Name
Type
Description
ids
LIST<STRING>
The ids of the connections to kill.
Return arguments
Name
Type
Description
connectionId
STRING
The id of the connection killed.
username
STRING
The username of the user of the killed connection.
message
STRING
Details about the outcome of the procedure.
Mode
DBMS
Database management
For more information, see Database administration and Database internals and transactional behavior.
db.checkpoint()Enterprise Edition
Details
Syntax
db.checkpoint() :: (success, message)
Description
Initiate and wait for a new check point, or wait any already on-going check point to complete. Note that this temporarily disables the db.checkpoint.iops.limit
setting in order to make the check point complete faster. This might cause transaction throughput to degrade slightly, due to increased IO load.
Return arguments
Name
Type
Description
success
BOOLEAN
Whether the checkpoint has successfully completed.
message
STRING
Details about the outcome of the procedure.
Mode
DBMS
This procedure is not considered safe to run from multiple threads. It is therefore not supported by the parallel runtime. For more information, see the Cypher Manual → Parallel runtime.
db.info()
DetailsSyntax
db.info() :: (id, name, creationDate)
Description
Provides information regarding the database.
Return arguments
Name
Type
Description
id
STRING
The id of the database.
name
STRING
The name of the database.
creationDate
STRING
The creation date of the database, formatted according to the ISO-8601 Standard.
Mode
READ
dbms.listActiveLocks()Enterprise Edition
Details
Syntax
dbms.listActiveLocks(queryId) :: (mode, resourceType, resourceId)
Description
List the active lock requests granted for the transaction executing the query with the given query id.
Input arguments
Name
Type
Description
queryId
STRING
The id of the query to check for active locks on.
Return arguments
Name
Type
Description
mode
STRING
The lock type: ('SHARED', 'EXCLUSIVE').
resourceType
STRING
The locked resource.
resourceId
INTEGER
The id of the locked resource.
Mode
DBMS
This procedure is not considered safe to run from multiple threads. It is therefore not supported by the parallel runtime. For more information, see the Cypher Manual → Parallel runtime.
db.listLocks()Admin OnlyEnterprise Edition
Details
Syntax
db.listLocks() :: (mode, resourceType, resourceId, transactionId)
Description
List all locks at this database.
Return arguments
Name
Type
Description
mode
STRING
The locking mode this lock is using, either "SHARED" or "EXCLUSIVE".
resourceType
STRING
The type of resource (e.g. nodes, relationships, labels) this lock protects.
resourceId
INTEGER
The id of the resource this lock protects.
transactionId
STRING
The id of the transaction that owns this lock.
Mode
DBMS
db.ping()
DetailsSyntax
db.ping() :: (success)
Description
This procedure can be used by client side tooling to test whether they are correctly connected to a database. The procedure is available in all databases and always returns true. A faulty connection can be detected by not being able to call this procedure.
Return arguments
Name
Type
Description
success
BOOLEAN
Whether or not the connection call to the database has been successful.
Mode
READ
dbms.routing.getRoutingTable()
DetailsSyntax
dbms.routing.getRoutingTable(context [, database ]) :: (ttl, servers)
Description
Returns the advertised bolt capable endpoints for a given database, divided by each endpoint’s capabilities. For example, an endpoint may serve read queries, write queries, and/or future getRoutingTable
requests.
Input arguments
Name
Type
Description
context
MAP
Routing context, for example, routing policies.
database
STRING
The database to get a routing table for.
Return arguments
Name
Type
Description
ttl
INTEGER
Time to live (in seconds) for the routing table.
servers
LIST<MAP>
Servers grouped by whether they are readers, writers, or routers.
Mode
DBMS
dbms.setDefaultDatabase()Admin OnlyEnterprise Edition
Details
Syntax
dbms.setDefaultDatabase(databaseName) :: (result)
Description
Change the default database to the provided value. The database must exist and the old default database must be stopped.
Input arguments
Name
Type
Description
databaseName
STRING
The name of the database.
Return arguments
Name
Type
Description
result
STRING
Information about the default database.
Mode
WRITE
Starting with Neo4j 2025.04, the default database can also be set to a local or remote database alias.
dbms.quarantineDatabase()Admin OnlyEnterprise EditionDeprecated in 2025.01Removed in Cypher 25
Details
Syntax
dbms.quarantineDatabase(databaseName, setStatus [, reason ]) :: (databaseName, quarantined, result)
Description
Place a database into quarantine or remove it from it.
Input arguments
Name
Type
Description
databaseName
STRING
The name of the database to set the quarantine status of.
setStatus
BOOLEAN
Whether or not to quarantine the database.
reason
STRING
The reason to quarantine the database.
Return arguments
Name
Type
Description
databaseName
STRING
The name of the database.
quarantined
BOOLEAN
Whether or not the database is quarantined.
result
STRING
Details about the outcome of the procedure.
Mode
DBMS
Replaced by
It is recommended to use dbms.unquarantineDatabase()
over dbms.quarantineDatabase()
due to its improvements and new features (see the operation
option).
dbms.unquarantineDatabase()Admin OnlyEnterprise EditionIntroduced in 2025.01
Details
Syntax
dbms.unquarantineDatabase(server, databaseName, operation) :: ()
Description
Lift quarantine from a database on a given server.
Input arguments
Name
Type
Description
server
STRING
The identifier of the server where the quarantine for database will be lifted.
database
STRING
The name of the database for the quarantine will be lifted.
operation
STRING
Optional operation to apply while lifting the quarantine.
Mode
DBMS
The possible values for the optional operation are:
-
keepStateKeepStore
— do nothing; leave store and cluster state as they are. -
replaceStateKeepStore
— join as a new member, clearing the current cluster state but keeping the store. -
replaceStateReplaceStore
— join as a new member, clearing both the current cluster state and the store.
If you choose to clear the current cluster state, the server will try to join as a new member,
but this joining can succeed if and only if there is a majority of old members "letting" the new members in.
Let’s assume our cluster has a topology with three primaries.
If there is only one server in QUARANTINED
mode, then it is safe to choose replaceStateKeepStore
or replaceStateReplaceStore
.
If there are two servers in QUARANTINED
mode, then you should not use concurrently replaceStateKeepStore
or replaceStateReplaceStore
for both servers because there would be no majority to let them in.
dbms.upgrade()Admin OnlyDeprecated in 5.9Removed in Cypher 25
Details
Syntax
dbms.upgrade() :: (status, upgradeResult)
Description
Upgrade the system database schema if it is not the current schema.
Return arguments
Name
Type
Description
status
STRING
The upgrade status of the system database.
upgradeResult
STRING
Information about the upgrade outcome.
Mode
WRITE
This procedure is not considered safe to run from multiple threads. It is therefore not supported by the parallel runtime. For more information, see the Cypher Manual → Parallel runtime.
dbms.upgradeStatus()Admin OnlyDeprecated in 5.9Removed in Cypher 25
Details
Syntax
dbms.upgradeStatus() :: (status, description, resolution)
Description
Report the current status of the system database sub-graph schema.
Return arguments
Name
Type
Description
status
STRING
The upgrade status of the system database.
description
STRING
Information describing the upgrade status.
resolution
STRING
Information about the steps necessary to upgrade.
Mode
READ
This procedure is not considered safe to run from multiple threads. It is therefore not supported by the parallel runtime. For more information, see the Cypher Manual → Parallel runtime.
GenAI and vectors
For more information, see:
db.create.setNodeVectorProperty
DetailsSyntax
db.create.setNodeVectorProperty(node, key, vector)
Description
Set a vector property on a given node in a more space efficient representation than Cypher’s SET
.
Input arguments
Name
Type
Description
node
NODE
The node on which the new property will be stored.
key
STRING
The name of the new property.
vector
ANY
The object containing the embedding.
Mode
WRITE
Procedure signatures from SHOW PROCEDURES
renders the vector arguments with a type of ANY
rather than the semantically correct type of LIST<INTEGER | FLOAT>
.
The types are still enforced as LIST<INTEGER | FLOAT>
.
db.create.setRelationshipVectorProperty()
DetailsSyntax
db.create.setRelationshipVectorProperty(relationship, key, vector)
Description
Set a vector property on a given relationship in a more space efficient representation than Cypher’s SET
.
Input arguments
Name
Type
Description
relationship
RELATIONSHIP
The relationship on which the new property will be stored.
key
STRING
The name of the new property.
vector
ANY
The object containing the embedding.
Mode
WRITE
Procedure signatures from SHOW PROCEDURES
renders the vector arguments with a type of ANY
rather than the semantically correct type of LIST<INTEGER | FLOAT>
.
The types are still enforced as LIST<INTEGER | FLOAT>
.
db.create.setVectorProperty()BetaDeprecated in 5.13Removed in Cypher 25
Details
Syntax
db.create.setVectorProperty(node, key, vector) :: (node)
Description
Set a vector property on a given node in a more space efficient representation than Cypher’s SET.
Input arguments
Name
Type
Description
node
NODE
The node on which the new property will be stored.
key
STRING
The name of the new property.
vector
ANY
The object containing the embedding.
Return arguments
Name
Type
Description
node
NODE
The node on which the vector property was set.
Mode
WRITE
Procedure signatures from SHOW PROCEDURES
renders the vector arguments with a type of ANY
rather than the semantically correct type of LIST<INTEGER | FLOAT>
.
The types are still enforced as LIST<INTEGER | FLOAT>
.
db.index.vector.createNodeIndex()Deprecated in 5.26Removed in Cypher 25
Details
Syntax
db.index.vector.createNodeIndex(indexName, label, propertyKey, vectorDimension, vectorSimilarityFunction)
Description
Create a named node vector index for the specified label and property with the given vector dimensionality using either the EUCLIDEAN or COSINE similarity function.
Both similarity functions are case-insensitive.
Use the db.index.vector.queryNodes
procedure to query the named index.
Input arguments
Name
Type
Description
indexName
STRING
indexName :: STRING
label
STRING
label :: STRING
propertyKey
STRING
propertyKey :: STRING
vectorDimension
INTEGER
vectorDimension :: INTEGER
vectorSimilarityFunction
STRING
vectorSimilarityFunction :: STRING
Mode
SCHEMA
Replaced by
the Cypher command CREATE VECTOR INDEX
. For more information, see the Cypher Manual → Create a vector index.
db.index.vector.queryNodes()
DetailsSyntax
db.index.vector.queryNodes(indexName, numberOfNearestNeighbours, query) :: (node, score)
Description
Query the given node vector index. Returns requested number of nearest neighbors to the provided query vector, and their similarity score to that query vector, based on the configured similarity function for the index. The similarity score is a value between [0, 1]; where 0 indicates least similar, 1 most similar.
Input arguments
Name
Type
Description
indexName
STRING
The name of the vector index.
numberOfNearestNeighbours
INTEGER
The size of the vector neighbourhood.
query
ANY
The object to find approximate matches for.
Return arguments
Name
Type
Description
node
NODE
A node which contains a vector property similar to the query object.
score
FLOAT
The score measuring how similar the node property is to the query object.
Mode
READ
db.index.vector.queryRelationships()
DetailsSyntax
db.index.vector.queryRelationships(indexName, numberOfNearestNeighbours, query) :: (relationship, score)
Description
Query the given relationship vector index. Returns requested number of nearest neighbors to the provided query vector, and their similarity score to that query vector, based on the configured similarity function for the index. The similarity score is a value between [0, 1]; where 0 indicates least similar, 1 most similar.
Input arguments
Name
Type
Description
indexName
STRING
The name of the vector index.
numberOfNearestNeighbours
INTEGER
The size of the vector neighbourhood.
query
ANY
The object to find approximate matches for.
Return arguments
Name
Type
Description
relationship
RELATIONSHIP
A relationship which contains a vector property similar to the query object.
score
FLOAT
The score measuring how similar the relationship property is to the query object.
Mode
READ
genai.vector.encodeBatch()
DetailsSyntax
genai.vector.encodeBatch(resources, provider, configuration) :: (index, resource, vector)
Description
Encode a given batch of resources as vectors using the named provider. For each element in the given resource LIST this returns:
-
the corresponding 'index' within that LIST,
-
the original 'resource' element itself,
-
and the encoded 'vector'.
Input arguments
Name
Type
Description
resources
LIST<STRING>
The object to transform into an embedding.
provider
STRING
The GenAI provider to use.
configuration
ANY
The provider specific settings.
Return arguments
Name
Type
Description
index
INTEGER
The index of the corresponding element in the input list.
resource
STRING
The name of the input resource.
vector
ANY
The generated vector embedding for the resource.
Mode
DEFAULT
For more information, see the Cypher Manual → Generating a batch of embeddings.
Procedure signatures from SHOW PROCEDURES
renders the vector arguments with a type of ANY
rather than the semantically correct type of LIST<INTEGER | FLOAT>
.
The types are still enforced as LIST<INTEGER | FLOAT>
.
genai.vector.listEncodingProviders()
DetailsSyntax
genai.vector.listEncodingProviders() :: (name, requiredConfigType, otionalConfigType, defaultConfig)
Description
Lists the available vector embedding providers.
Return arguments
Name
Type
Description
name
STRING
The name of the GenAI provider.
requiredConfigType
STRING
The signature of the required config map.
optionalConfigType
STRING
The signature of the optional config map.
defaultConfig
MAP
The default values for the GenAI provider.
Mode
DEFAULT
Index management
For more information, see:
db.awaitIndex()
DetailsSyntax
db.awaitIndex(indexName [, timeOutSeconds ])
Description
Wait for an index to come online (for example: CALL db.awaitIndex("MyIndex", 300)).
Input arguments
Name
Type
Description
indexName
STRING
The name of the awaited index.
timeOutSeconds
INTEGER
The maximum time to wait in seconds.
Mode
READ
This procedure is not considered safe to run from multiple threads. It is therefore not supported by the parallel runtime. For more information, see the Cypher Manual → Parallel runtime.
db.awaitIndexes()
DetailsSyntax
db.awaitIndexes([ timeOutSeconds ])
Description
Wait for all indexes to come online (for example: CALL db.awaitIndexes(300)).
Input arguments
Name
Type
Description
timeOutSeconds
INTEGER
The maximum time to wait in seconds.
Mode
READ
This procedure is not considered safe to run from multiple threads. It is therefore not supported by the parallel runtime. For more information, see the Cypher Manual → Parallel runtime.
db.index.fulltext.awaitEventuallyConsistentIndexRefresh()
DetailsSyntax
db.index.fulltext.awaitEventuallyConsistentIndexRefresh()
Description
Wait for the updates from recently committed transactions to be applied to any eventually-consistent full-text indexes.
Mode
READ
db.index.fulltext.listAvailableAnalyzers()
DetailsSyntax
db.index.fulltext.listAvailableAnalyzers() :: (analyzer, description, stopwords)
Description
List the available analyzers that the full-text indexes can be configured with.
Return arguments
Name
Type
Description
analyzer
STRING
The name of the analyzer.
description
STRING
The description of the analyzer.
stopwords
LIST<STRING>
The stopwords used by the analyzer to tokenize strings.
Mode
READ
db.index.fulltext.queryNodes()
DetailsSyntax
db.index.fulltext.queryNodes(indexName, queryString [, options ]) :: (node, score)
Description
Query the given full-text index. Returns the matching nodes and their Lucene query score, ordered by score.
Valid key: value pairs for the options
map are:
-
'skip' — to skip the top N results.
-
'limit' — to limit the number of results returned.
-
'analyzer' — to use the specified analyzer as a search analyzer for this query.
The options
map and any of the keys are optional.
An example of the options
map: {skip: 30, limit: 10, analyzer: 'whitespace'}
Input arguments
Name
Type
Description
indexName
STRING
The name of the full-text index.
queryString
STRING
The string to find approximate matches for.
options
MAP
{skip :: INTEGER, limit :: INTEGER, analyzer :: STRING}
Return arguments
Name
Type
Description
node
NODE
A node which contains a property similar to the query string.
score
FLOAT
The score measuring how similar the node property is to the query string.
Mode
READ
db.index.fulltext.queryRelationships()
DetailsSyntax
db.index.fulltext.queryRelationships(indexName, queryString [, options ]) :: (relationship, score)
Description
Query the given full-text index. Returns the matching relationships and their Lucene query score, ordered by score.
Valid key: value pairs for the options
map are:
-
'skip' — to skip the top N results.
-
'limit' — to limit the number of results returned.
-
'analyzer' — to use the specified analyzer as a search analyzer for this query.
The options
map and any of the keys are optional.
An example of the options
map: {skip: 30, limit: 10, analyzer: 'whitespace'}
Input arguments
Name
Type
Description
indexName
STRING
The name of the full-text index.
queryString
STRING
The string to find approximate matches for.
options
MAP
{skip :: INTEGER, limit :: INTEGER, analyzer :: STRING}
Return arguments
Name
Type
Description
relationship
RELATIONSHIP
A relationship which contains a property similar to the query string.
score
FLOAT
The score measuring how similar the relationship property is to the query string.
Mode
READ
db.resampleIndex()
DetailsSyntax
db.resampleIndex(indexName)
Description
Schedule resampling of an index (for example: CALL db.resampleIndex("MyIndex")).
Input arguments
Name
Type
Description
indexName
STRING
The name of the index.
Mode
READ
This procedure is not considered safe to run from multiple threads. It is therefore not supported by the parallel runtime. For more information, see the Cypher Manual → Parallel runtime.
db.resampleOutdatedIndexes()
DetailsSyntax
db.resampleOutdatedIndexes()
Description
Schedule resampling of all outdated indexes.
Mode
READ
This procedure is not considered safe to run from multiple threads. It is therefore not supported by the parallel runtime. For more information, see the Cypher Manual → Parallel runtime.
Metrics
dbms.queryJmx()
DetailsSyntax
dbms.queryJmx(query) :: (name, description, attributes)
Description
Query JMX management data by domain and name. For instance, use : to find all JMX beans.
Input arguments
Name
Type
Description
query
STRING
A query for MBeans on this MBeanServer (e.g. ':,name=neo4j' for all metrics in neo4j database).
Return arguments
Name
Type
Description
name
STRING
The name of the metric.
description
STRING
The description of the metric.
attributes
MAP
A collection with the attributes (values) of that metric.
Mode
DBMS
Schema and metadata
db.schema.nodeTypeProperties()
DetailsSyntax
db.schema.nodeTypeProperties() :: (nodeType, nodeLabels, propertyName, propertyTypes, mandatory)
Description
Show the derived property schema of the nodes in tabular form.
Return arguments
Name
Type
Description
nodeType
STRING
A name generated from the labels on the node.
nodeLabels
LIST<STRING>
A list containing the labels on a category of node.
propertyName
STRING
A property key on a category of node.
propertyTypes
LIST<STRING>
All types of a property belonging to a node category.
mandatory
BOOLEAN
Whether or not the property is present on all nodes belonging to a node category.
Mode
READ
propertyTypes
column returns the potential Java types for a given property.
In Cypher 25, it returns the potential Cypher types instead.
For information about Cypher’s property types, see the Cypher Manual → Property types.
This procedure is not considered safe to run from multiple threads. It is therefore not supported by the parallel runtime. For more information, see the Cypher Manual → Parallel runtime.
db.schema.relTypeProperties()
DetailsSyntax
db.schema.relTypeProperties() :: (relType, propertyName, propertyTypes, mandatory)
Description
Show the derived property schema of the relationships in tabular form.
Return arguments
Name
Type
Description
relType
STRING
A name generated from the type on the relationship.
propertyName
STRING
A property key on a category of relationship.
propertyTypes
LIST<STRING>
All types of a property belonging to a relationship category.
mandatory
BOOLEAN
Whether or not the property is present on all relationships belonging to a relationship category.
Mode
READ
propertyTypes
column returns the potential Java types for a given property.
In Cypher 25, it returns the potential Cypher types instead.
For information about Cypher’s property types, see the Cypher Manual → Property types.
This procedure is not considered safe to run from multiple threads. It is therefore not supported by the parallel runtime. For more information, see the Cypher Manual → Parallel runtime.
db.schema.visualization()
DetailsSyntax
db.schema.visualization() :: (nodes, relationships)
Description
Visualizes the schema of the data based on available statistics. A new node is returned for each label. The properties represented on the node include: name
(label name), indexes
(list of indexes), and constraints
(list of constraints). A relationship of a given type is returned for all possible combinations of start and end nodes. The properties represented on the relationship include: name
(type name). Note that this may include additional relationships that do not exist in the data due to the information available in the count store.
Return arguments
Name
Type
Description
nodes
LIST<NODE>
A list of virtual nodes representing each label in the database.
relationships
LIST<RELATIONSHIP>
A list of virtual relationships representing all combinations between start and end nodes in the database.
Mode
READ
This procedure is not considered safe to run from multiple threads. It is therefore not supported by the parallel runtime. For more information, see the Cypher Manual → Parallel runtime.
db.createLabel()
DetailsSyntax
db.createLabel(newLabel)
Description
Create a label
Input arguments
Name
Type
Description
newLabel
STRING
Label name.
Mode
WRITE
db.createProperty()
DetailsSyntax
db.createProperty(newProperty)
Description
Create a Property
Input arguments
Name
Type
Description
newProperty
STRING
Property name.
Mode
WRITE
db.createRelationshipType
DetailsSyntax
db.createRelationshipType(newRelationshipType)
Description
Create a RelationshipType
Input arguments
Name
Type
Description
newRelationshipType
STRING
Relationship type name.
Mode
WRITE
db.labels()
DetailsSyntax
db.labels() :: (label)
Description
List all labels attached to nodes within a database according to the user’s access rights. The procedure returns empty results if the user is not authorized to view those labels.
Return arguments
Name
Type
Description
label
STRING
A label within the database.
Mode
READ
db.propertyKeys()
DetailsSyntax
db.propertyKeys() :: (propertyKey)
Description
List all property keys in the database.
Return arguments
Name
Type
Description
propertyKey
STRING
A property key in the database.
Mode
READ
This procedure is not considered safe to run from multiple threads. It is therefore not supported by the parallel runtime. For more information, see the Cypher Manual → Parallel runtime.
db.relationshipTypes()
DetailsSyntax
db.relationshipTypes() :: (relationshipType)
Description
List all types attached to relationships within a database according to the user’s access rights. The procedure returns empty results if the user is not authorized to view those relationship types.
Return arguments
Name
Type
Description
relationshipType
STRING
A relationship type in the database.
Mode
READ
This procedure is not considered safe to run from multiple threads. It is therefore not supported by the parallel runtime. For more information, see the Cypher Manual → Parallel runtime.
Statistics and query planning
For more information, see Statistics and execution plans
db.clearQueryCaches()Admin Only
Details
Syntax
db.clearQueryCaches() :: (value)
Description
Clears all query caches.
Return arguments
Name
Type
Description
value
STRING
Information about the number of cleared query caches.
Mode
DBMS
db.prepareForReplanning()Admin Only
Details
Syntax
db.prepareForReplanning([ timeOutSeconds ])
Description
Triggers an index resample and waits for it to complete, and after that clears query caches. After this procedure has finished queries will be planned using the latest database statistics.
Input arguments
Name
Type
Description
timeOutSeconds
INTEGER
The maximum time to wait in seconds.
Mode
READ
This procedure is not considered safe to run from multiple threads. It is therefore not supported by the parallel runtime. For more information, see the Cypher Manual → Parallel runtime.
db.stats.clearAdmin Only
Details
Syntax
db.stats.clear(section) :: (section, success, message)
Description
Clear collected data of a given data section. Valid sections are 'QUERIES'
Input arguments
Name
Type
Description
section
STRING
The section to clear. The only available section is: 'QUERIES'.
Return arguments
Name
Type
Description
section
STRING
The section cleared.
success
BOOLEAN
Whether the section was successfully cleared.
message
STRING
Details about the outcome of the procedure.
Mode
READ
db.stats.collect()Admin Only
Details
Syntax
db.stats.collect(section [, config ]) :: (section, success, message)
Description
Start data collection of a given data section. Valid sections are 'QUERIES'
Input arguments
Name
Type
Description
section
STRING
The section to collect. The only available section is: 'QUERIES'.
config
MAP
{durationSeconds = -1 INTEGER}
Return arguments
Name
Type
Description
section
STRING
The section collected.
success
BOOLEAN
Whether the section was successfully collected.
message
STRING
Details about the outcome of the procedure.
Mode
READ
db.stats.retrieve()Admin Only
Details
Syntax
db.stats.retrieve(section [, config ]) :: (section, data)
Description
Retrieve statistical data about the current database. Valid sections are 'GRAPH COUNTS', 'TOKENS', 'QUERIES', 'META'
Input arguments
Name
Type
Description
section
STRING
A section of stats to retrieve: ('GRAPH COUNTS', 'TOKENS', 'QUERIES', 'META').
config
MAP
{maxInvocations = 100 INTEGER}
Return arguments
Name
Type
Description
section
STRING
The section retrieved.
data
MAP
Data pertaining to the retrieved statistics.
Mode
READ
db.stats.retrieveAllAnonymized()Admin Only
Details
Syntax
db.stats.retrieveAllAnonymized(graphToken [, config ]) :: (section, data)
Description
Retrieve all available statistical data about the current database, in an anonymized form.
Input arguments
Name
Type
Description
graphToken
STRING
The name of the graph token.
config
MAP
{maxInvocations = 100 INTEGER}
Return arguments
Name
Type
Description
section
STRING
The section retrieved.
data
MAP
Data pertaining to the retrieved statistics.
Mode
READ
db.stats.status()Admin Only
Details
Syntax
db.stats.status() :: (section, status, data)
Description
Retrieve the status of all available collector daemons, for this database.
Return arguments
Name
Type
Description
section
STRING
String with the message "QUERIES".
status
STRING
The status of the QueryCollector: "idle" or "collecting".
data
MAP
data :: MAP
Mode
READ
db.stats.stop()Admin Only
Details
Syntax
db.stats.stop(section) :: (section, success, message)
Description
Stop data collection of a given data section. Valid sections are 'QUERIES'
Input arguments
Name
Type
Description
section
STRING
The section to stop. The only available section is: 'QUERIES'.
Return arguments
Name
Type
Description
section
STRING
The stopped section.
success
BOOLEAN
Whether the section was successfully stopped.
message
STRING
Details about the outcome of the procedure.
Mode
READ
Transaction management
tx.getMetaData()
DetailsSyntax
tx.getMetaData() :: (metadata)
Description
Provides attached transaction metadata.
Return arguments
Name
Type
Description
metadata
MAP
Metadata about the transaction.
Mode
DBMS
tx.setMetaData()
DetailsSyntax
tx.setMetaData(data)
Description
Attaches a map of data to the transaction. The data will be printed when listing queries, and inserted into the query log.
Input arguments
Name
Type
Description
data
MAP
Metadata to attach to the transaction.
Mode
DBMS