Skip to content

roachtest/tlp: randomly force generic query plans #145256

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

mgartner
Copy link
Collaborator

Generic query plans are now forced for 25% of TLP queries. Note that
only one type of TLP query uses placeholders, which are required for
"interesting" generic query plans, simple SELECT .. WHERE .. queries.
Joins and grouping do not yet use placeholders.

Fixes #128912

Release note: None

Generic query plans are now forced for 25% of TLP queries. Note that
only one type of TLP query uses placeholders, which are required for
"interesting" generic query plans, simple `SELECT .. WHERE ..` queries.
Joins and grouping do not yet use placeholders.

Fixes cockroachdb#128912

Release note: None
@mgartner mgartner requested review from a team and mw5h and removed request for a team April 25, 2025 18:34
@cockroach-teamcity
Copy link
Member

This change is Reviewable

@mgartner mgartner requested a review from michae2 April 28, 2025 18:31
Copy link
Collaborator

@michae2 michae2 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for doing this!

Reviewed 1 of 1 files at r1, all commit messages.
Reviewable status: :shipit: complete! 0 of 0 LGTMs obtained (waiting on @mw5h)


pkg/cmd/roachtest/tests/tlp.go line 226 at r1 (raw file):

		const (
			forceGeneric = "SET plan_cache_mode = force_generic_plan"
			auto         = "SET plan_cache_mode = auto"

nit: It might be clearer to use RESET plan_cache_mode if the purpose is to assign it back to the default.


pkg/cmd/roachtest/tests/tlp.go line 232 at r1 (raw file):

			return err
		}
		logStmt(forceGeneric)

nit: I think we only want to do this if a TLP mismatch is found, otherwise the log will be full of these statements.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

roachtest: add randomized test exercising generic query plans
3 participants