mmapSize

Queries or sets the maximum size of the memory-mapped I/O region in bytes.

This pragma controls the amount of the database file that is memory-mapped for I/O. Memory-mapping can improve performance by reducing system calls and memory copies, especially for read-heavy workloads on large databases.

  • A positive value sets the maximum number of bytes to be memory-mapped.

  • A value of 0 (the default) disables memory-mapped I/O.

The actual amount of memory-mapped space may be less than the specified value if the database file is smaller. This setting is a hint to the OS and may not be available on all platforms.

Author

MOHAMMAD AZIM ANSARI

See also