Execution time of an SQLite Query: Units

后端 未结 1 1005
萌比男神i
萌比男神i 2021-01-01 11:21

As described in SQLite Documentation one could use:

sqlite> .timer ON

or add the same command to ~/.sqliterc

When this is done,

相关标签:
1条回答
  • 2021-01-01 11:40

    user is the time that the CPU spent executing code in user space (i.e., in the database itself); sys is for code in the kernel.

    When doing I/O, the CPU spends most of the time waiting.

    Sufficiently recent versions of SQLite also show the elapsed real time:

    SQLite version 3.8.6 2014-08-15 11:46:33
    Enter ".help" for usage hints.
    Connected to a transient in-memory database.
    Use ".open FILENAME" to reopen on a persistent database.
    sqlite> .timer on
    sqlite> UPDATE ...;
    Run Time: real 36.591 user 17.362911 sys 1.809612
    
    0 讨论(0)
提交回复
热议问题