Way to find out which Compilation Options were used to build SQLite

后端 未结 3 1999
鱼传尺愫
鱼传尺愫 2021-01-04 06:48

During my performance tests I found out the the SQLite version which Apple provides on the iPhone 3.0 is significantly faster then my self compiled amalgamation SQLite versi

相关标签:
3条回答
  • 2021-01-04 07:31

    It looks like the only different in the pragma settings is the cache_size which is default 2000 but on the iPhone it is 500.

    On some systems it's possible to get read the compiler setting with this: objdump --full-contents --section .GCC.command.line

    0 讨论(0)
  • 2021-01-04 07:46

    You can use the compile_options pragma (or the related functions as mentioned in the linked documentation) to view the compile-time options that were used when building SQLite. However, the availability of this pragma (and the related functions) seems to depend on whether it was enabled at compile-time or not. The SQLite documentation says:

    Support for the diagnostic functions sqlite3_compileoption_used() and sqlite3_compileoption_get() may be omitted by specifying the SQLITE_OMIT_COMPILEOPTION_DIAGS option at compile time.

    So it is likely that your distribution did not enable this feature at compile time, which means you may not be able to view the options.

    0 讨论(0)
  • 2021-01-04 07:50

    THere is no way to ask libsqlite for its exact configuration short of trying all the possible permutations and testing each to see which behaves the same (unless Apple has made custom modifications). The best you can get to call sqlite3_libversion which returns sqlite's version number.

    0 讨论(0)
提交回复
热议问题