Skip to content

PERF: avoid SQL MetaData reflection in init #45260 #45371

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

Merged
merged 4 commits into from
Jan 16, 2022

Conversation

fangchenli
Copy link
Member

@fangchenli fangchenli commented Jan 14, 2022

@pep8speaks
Copy link

pep8speaks commented Jan 14, 2022

Hello @fangchenli! Thanks for updating this PR. We checked the lines you've touched for PEP 8 issues, and found:

There are currently no PEP 8 issues detected in this Pull Request. Cheers! 🍻

Comment last updated at 2022-01-15 20:36:30 UTC

Copy link
Member

@jorisvandenbossche jorisvandenbossche 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 the quick fix, looks good!

One comment: we also have a tables property on the SQLDatabase. It doesn't seem to be used internally in the SQLDatabase class itself, but to keep that property useful, we might need to reflect meta at that moment to actually get a list of tables? (no idea actually, just guessing)

@jorisvandenbossche jorisvandenbossche added this to the 1.4 milestone Jan 14, 2022
@mroeschke mroeschke added IO SQL to_sql, read_sql, read_sql_query Performance Memory or execution speed performance labels Jan 15, 2022
@fangchenli
Copy link
Member Author

Thanks for the quick fix, looks good!

One comment: we also have a tables property on the SQLDatabase. It doesn't seem to be used internally in the SQLDatabase class itself, but to keep that property useful, we might need to reflect meta at that moment to actually get a list of tables? (no idea actually, just guessing)

Thanks for the comment. I'll take a look at the tables property later.

@jreback jreback merged commit a659f1d into pandas-dev:main Jan 16, 2022
@jreback
Copy link
Contributor

jreback commented Jan 16, 2022

thanks @fangchenli very nice !

@jreback
Copy link
Contributor

jreback commented Jan 16, 2022

@meeseeksdev backport 1.4.x

@lumberbot-app
Copy link

lumberbot-app bot commented Jan 16, 2022

Something went wrong ... Please have a look at my logs.

@fangchenli fangchenli deleted the revert-metadata-reflect branch January 16, 2022 19:20
jreback pushed a commit that referenced this pull request Jan 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
IO SQL to_sql, read_sql, read_sql_query Performance Memory or execution speed performance
Projects
None yet
Development

Successfully merging this pull request may close these issues.

PERF: 1.4.0rc1 Execution time of pd.read_sql increased from seconds to minutes
5 participants