chore(deps): adopt @query-doctor/core ^0.22.0 - #224
Merged
Conversation
Brings in expression index recommendations for function-wrapped columns, so a query filtering on lower(email) gets an index instead of only a warning. Co-Authored-By: Claude <noreply@anthropic.com>
There was a problem hiding this comment.

Query Doctor — 6 successful checks
More details via MCP → get_ci_run({ runId: "019fd4ac-101f-78d4-81b1-36ff402b5a80" }) · view run · docs
3 queries read against main on assumed statistics of 10,000,000 rows per table. Sync production stats for costs measured against your real data.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Goal
Deliver expression index recommendations to CI users. The engine change landed in Query-Doctor/Site#3881 and published as
@query-doctor/core@0.22.0; nothing reaches a CI run until the analyzer resolves that version. This is the last step.What
A query filtering on a function now gets an index recommendation.
WHERE lower(email) = $1previously produced no recommendation and only a warning saying a function on a column prevents index usage. It now producesCREATE INDEX ON users ((lower(email))), costed against the planner like any other recommendation. The same holds forbtrim,md5,length,substring,||, andcoalesce.coalesce(nickname, email) = $1previously produced separate recommendations fornicknameandemail, neither of which can serve that predicate. It now produces one expression index.Two fixes come with it. An index recommendation could be hidden: a plain composite reported that it covered an expression index on the same leading column, which it cannot serve. And an optimization could fail outright, because Postgres refuses to index an expression whose function is not
IMMUTABLEand that refusal aborted the transaction.How
A version bump and a lockfile refresh. No analyzer code changes.
The caret had to move rather than resolve on its own:
^0.21.0does not admit0.22.0.Worth knowing for this repo specifically: core now states on
PostgresTransactionthat a failedexecrolls back on its own and later execs still run.src/sql/postgresjs.tsalready satisfies that, since it wraps every statement in a savepoint — behaviour inherited from postgres.js and reimplemented by hand in90c05fdduring the move topg. Core no longer takes savepoints of its own, so that adapter is now the only thing providing the guarantee here. An adapter added later has to do the same or usewithStatementIsolationfrom core.Tests
Full suite passes against
0.22.0: 43 files, 440 tests. Build clean.The Site-side
analyzer-compatcheck ran this repo's suite against the new core throughout #3881 and passes.🤖 Generated with Claude Code