LQO 0.2.0 adds lqo serve. Instead of reading a log, LQO now sits between the application and PostgreSQL as a proxy, passes every message through unchanged, and times every query by shape. With a replica to work on, it tries the slow shapes there under PostgreSQL’s planner settings, three at a time, picked by Thompson sampling, and proves a setting only under the same strict rule as lqo advise.
This version only watches and reports, on a status page and in its state file. In the test run, it proved “no nested loop” for the demo’s trap query after about five minutes of learning, around 22% faster on the replica. Active mode, which applies proven settings to live queries and takes one back if it runs slower, is next.