sqlitebrowser / sqlitebrowser/sqlitebrowser

Transactions used where they dont need to be

Open
#254 9 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement question transactions
Dominant language
C++
Stars
24.6k
Forks
2.4k
Avg merge
3d 49m
Merged PRs (30d)
3

Description

EXPLAIN QUERY PLAN SELECT BlahField FROM BladDb WHERE foo=0;

begins a transaction when one is not required.

When using the DB browser to execute certain queries it enables the "write changes" and "revert changes" options when this is not required. This means DB Browser creates a transaction that is awaiting a COMMIT or ROLLBACK but no such thing is required in this case since the explain verb does not write anything. In journal DELETE mode an empty journal is created.

SELECT BlahField FROM BladDb WHERE foo=0;

works as expected and no transaction is creating awaiting a COMMIT or ROLLBACK.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the EXPLAIN QUERY PLAN behavior in DB Browser and compare it with the plain SELECT example. Trace the transaction handling for read-only queries; done means EXPLAIN QUERY PLAN does not enable write/revert controls, create an unnecessary transaction, or create an empty journal.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp, sqlite
Domain
databases
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.