Fossil SCM

checkin/f044cf2a91b5906fa0ffc82de961b4d124910c37ffc4024628e9f1879f152c4b

5 years, 4 months ago by drh

Notes On How To Locate SQL Statements That Are Candidates For Reuse

With this check-in, the --sqltrace option adds a comment at the end of each SQL statement of the form "Nth run" where N is the number of prior executions of the same statement. If you capture the --sqltrace output (which is on stderr instead of stdout) you can then search for all "1st run" queries and look for duplicates.

   ./fossil test-http --sqltrace <some-request.txt 2>sql-out.txt
   grep ' 1st run' sql-out.txt | sort | open -f

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button