-
-
Notifications
You must be signed in to change notification settings - Fork 18.5k
HDFStore.select slowed by decode even when using columns= #5441
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
Comments
can you provide a reproducable example? |
try making the columns that you are using |
Thanks for your reply! I tested it with and without data_columns, nothing changes. Here's an example:
just the existence of a string column will make it slow because of the decode, even if the decoded data is not needed. Also using |
pytables is row-oriented, so it returns a full row when selected; this is then reindexed with the however, can be easily fixed, give this PR a try: The slower method is used when the utf-8 decoding fails (which for example non-ascii like data, e.g. stuff that str can convert). Here are several other ways to deal with this:
|
Thanks, this helps allot.
|
see also #4454 this is the best way to do this |
I realized when profiling a slow select (200% more wall-time as direct pytables call and high memory usage) that most of the time is spend inside bytes.decode called by _unconvert_strings_array, even when selecting only int64 columns. It seems spend time and memory to decode string that are never returned.
I'm using python 3.3 and latest pandas (commit 2d2e8b5).
I gladly get back with more details if needed.
The text was updated successfully, but these errors were encountered: