Api.JetDefragment2 メソッド
データベース内のデータorganizationを向上させるデータベース最適化タスクを開始および停止します。
Namespace:Microsoft.Isam.Esent.Interop
アセンブリ: Microsoft.Isam.Esent.Interop (Microsoft.Isam.Esent.Interop.dll)
構文
'Declaration
Public Shared Function JetDefragment2 ( _
sesid As JET_SESID, _
dbid As JET_DBID, _
tableName As String, _
ByRef passes As Integer, _
ByRef seconds As Integer, _
callback As JET_CALLBACK, _
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 callback As JET_CALLBACK
Dim grbit As DefragGrbit
Dim returnValue As JET_wrn
returnValue = Api.JetDefragment2(sesid, _
dbid, tableName, passes, seconds, _
callback, grbit)
public static JET_wrn JetDefragment2(
JET_SESID sesid,
JET_DBID dbid,
string tableName,
ref int passes,
ref int seconds,
JET_CALLBACK callback,
DefragGrbit grbit
)
パラメーター
sesid
種類: Microsoft.Isam.Esent.Interop.JET_SESID呼び出しに使用するセッション。
dbid
種類: Microsoft.Isam.Esent.Interop.JET_DBID最適化するデータベース。
tableName
型: System.String未使用のパラメーター。 最適化は、指定されたデータベース ID によって記述されたデータベース全体に対して実行されます。
渡します
種類: System.Int32オンライン最適化タスクを開始するときに、このパラメーターは最適化パスの最大数を設定します。 オンライン最適化タスクを停止すると、このパラメーターは実行されたパスの数に設定されます。
seconds
種類: System.Int32オンライン最適化タスクを開始するときに、このパラメーターは最適化の最大時間を設定します。 オンライン最適化タスクを停止すると、この出力バッファーは最適化に使用される時間の長さに設定されます。
コールバック (callback)
種類: Microsoft.Isam.Esent.Interop.JET_CALLBACK進行状況を報告するために defrag が使用するコールバック関数。
grbit
種類: Microsoft.Isam.Esent.Interop.DefragGrbit最適化オプション。
戻り値
種類: Microsoft.Isam.Esent.Interop.JET_wrn
警告コード。
解説
JetDefragment2 に渡されるコールバックは非同期で実行できます。 GC は、アンマネージド コードにコールバックへの参照があることを知らないので、コールバックが収集されていないことを確認することが重要です。
関連項目
リファレンス
フィードバック
https://aka.ms/ContentUserFeedback」を参照してください。
以下は間もなく提供いたします。2024 年を通じて、コンテンツのフィードバック メカニズムとして GitHub の issue を段階的に廃止し、新しいフィードバック システムに置き換えます。 詳細については、「フィードバックの送信と表示