Name
read_uncommitted — Enable reads of uncommitted data from database cache
Common Usage
PRAGMA read_uncommitted;
PRAGMA read_uncommitted = switch
;
Description
The read_uncommitted
pragma gets or sets the shared
cache isolation method.
If the same process opens the same database multiple times, SQLite can be configured to allow those connections to share a single cache instance. This is helpful in very low-memory situations, such as low-cost embedded systems.
This pragma controls which locks are required to access the shared cache. Setting this pragma relaxes some of the locking requirements and allows connections to read from the cache, even if another connection is in the middle of a transaction. This allows better concurrency, but it also means that readers may see data the writer has not committed, breaking transaction isolation.
The read_uncommitted
pragma is only applicable to
systems that use shared cache mode, which is normally not used
on desktop systems. If you are using shared cache mode and may
have a need for this pragma, please see the source code and
online documentation at http://www.sqlite.org/sharedcache.html for more
information.
Get Using SQLite now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.