Skip to content
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

split lightning's I_S.columns query into small ones to avoid slow query #57115

Closed
lance6716 opened this issue Nov 5, 2024 · 0 comments · Fixed by #57117
Closed

split lightning's I_S.columns query into small ones to avoid slow query #57115

lance6716 opened this issue Nov 5, 2024 · 0 comments · Fixed by #57117
Labels
type/enhancement The issue or PR belongs to an enhancement.

Comments

@lance6716
Copy link
Contributor

Enhancement

currently

rows, e := tx.Query(`
SELECT table_name, column_name, column_type, generation_expression, extra
FROM information_schema.columns
WHERE table_schema = ?
ORDER BY table_name, ordinal_position;
`, schemaName)

will query for the whole database. We can only query needed tables and use proper batch size

@lance6716 lance6716 added the type/enhancement The issue or PR belongs to an enhancement. label Nov 5, 2024
@lance6716 lance6716 changed the title split lightning's SQL into small queries to avoid slow query split lightning's I_S.columns query into small ones to avoid slow query Nov 5, 2024
@ti-chi-bot ti-chi-bot bot closed this as completed in 01e2ff0 Nov 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/enhancement The issue or PR belongs to an enhancement.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant