Orientdb 简明教程

OrientDB - Optimize Database

根据技术术语, Optimization 意味着“在最短的时间内,达到最好的可能性能”。参照数据库,优化包含最大化数据检索的速度和效率。

As per technical terminology Optimization means "Achieve the better possible performance in the quickest amount of time." With reference to database, optimization involves maximizing the speed and efficiency with which data is retrieved.

OrientDB 支持轻量级边,即数据实体之间的直接关系。简单来说,它是一种字段到字段的关系。OrientDB 提供了优化数据库的不同方式。它支持将常规边转换为轻量级边。

OrientDB supports lightweight edges, which means a direct relation between the data entities. In simple terms, it is a field-to-field relation. OrientDB provides different ways to optimize the database. It supports the conversion of regular edges to lightweight edges.

以下命令为优化数据库命令的基本语法。

The following statement is the basic syntax of the Optimize database command.

OPTMIZE DATABASE [-lwedges] [-noverbose]

lwedges 将常规节点转化为轻量级节点和 noverbose 禁用输出。

Where lwedges converts regular edges into lightweight edges and noverbose disables the output.

Example

在这个例子中,我们将使用与前一章节中创建的同名的数据库“demo”。您可以使用下列优化数据库命令。

In this example, we will use the same database named ‘demo’ that we created in the previous chapter. You can use the following optimize database command.

OPTIMIZE DATABASE -lwedges

如果成功执行,您会得到一些成功通知以及完成消息。

If it is successfully executed, you will get some successful notifications along with the completion message.

Database Optimization completed in 35ms