Skip to content

sql: add a virtual index on database name for SHOW GRANTS ON DATABASE#90597

Merged
craig[bot] merged 1 commit intocockroachdb:masterfrom
ajwerner:ajwerner/improve-show-grants-for-database
Oct 26, 2022
Merged

sql: add a virtual index on database name for SHOW GRANTS ON DATABASE#90597
craig[bot] merged 1 commit intocockroachdb:masterfrom
ajwerner:ajwerner/improve-show-grants-for-database

Conversation

@ajwerner
Copy link
Copy Markdown
Contributor

@ajwerner ajwerner commented Oct 25, 2022

Before this change, we'd always fetch all databases. This is expensive if there are many. It's also the case that the databases page will run this for each database. In that case, this was an N^2 proposition.

Epic: CRDB-20865

Release note: None

@ajwerner ajwerner requested a review from a team October 25, 2022 04:04
@cockroach-teamcity
Copy link
Copy Markdown
Member

This change is Reviewable

@ajwerner ajwerner force-pushed the ajwerner/improve-show-grants-for-database branch 3 times, most recently from cdab66c to 8fb3e08 Compare October 25, 2022 17:03
Before this change, we'd always fetch all databases. This is expensive if there
are many. It's also the case that the databases page will run this for each
database. In that case, this was an N^2 proposition.

Release note: None
@ajwerner ajwerner force-pushed the ajwerner/improve-show-grants-for-database branch from 8fb3e08 to 02cc484 Compare October 25, 2022 17:22
Copy link
Copy Markdown

@postamar postamar left a comment

Choose a reason for hiding this comment

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

:lgtm:

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

@ajwerner
Copy link
Copy Markdown
Contributor Author

TFTR!

bors r+

@craig
Copy link
Copy Markdown
Contributor

craig bot commented Oct 26, 2022

Build succeeded:

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.

4 participants