Api.JetDefragment 方法

啟動和停止資料庫重組工作,以改善資料庫內的資料組織。

Namespace:Microsoft.Isam.Esent.Interop
裝配: microsoft.Isam.Esent.Interop (in Microsoft.Isam.Esent.Interop.dll)

語法

'Declaration
Public Shared Function JetDefragment ( _
    sesid As JET_SESID, _
    dbid As JET_DBID, _
    tableName As String, _
    ByRef passes As Integer, _
    ByRef seconds As Integer, _
    grbit As DefragGrbit _
) As JET_wrn
'Usage
Dim sesid As JET_SESID
Dim dbid As JET_DBID
Dim tableName As String
Dim passes As Integer
Dim seconds As Integer
Dim grbit As DefragGrbit
Dim returnValue As JET_wrn

returnValue = Api.JetDefragment(sesid, _
    dbid, tableName, passes, seconds, _
    grbit)
public static JET_wrn JetDefragment(
    JET_SESID sesid,
    JET_DBID dbid,
    string tableName,
    ref int passes,
    ref int seconds,
    DefragGrbit grbit
)

參數

  • tableName
    類型: System.String

    未使用的參數。 重組會針對指定資料庫識別碼所描述的整個資料庫執行重組。

  • 通過
    類型: System.Int32

    啟動線上重組工作時,此參數會設定重組階段的最大數目。 停止線上重組工作時,此參數會設定為執行的傳遞數目。

  • seconds
    類型: System.Int32

    啟動線上重組工作時,此參數會設定重組的時間上限。 停止線上重組工作時,此輸出緩衝區會設定為用於重組的時間長度。

傳回值

類型: Microsoft.Isam.Esent.Interop.JET_wrn
警告碼。

另請參閱

參考

Api 類別

Api 成員

Microsoft.Isam.Esent.Interop 命名空間