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

Large Memory footprint for processing String results #219

Closed
pnorth1 opened this issue Dec 22, 2018 · 2 comments
Closed

Large Memory footprint for processing String results #219

pnorth1 opened this issue Dec 22, 2018 · 2 comments

Comments

@pnorth1
Copy link

pnorth1 commented Dec 22, 2018

I'm on Julia v1.0.3 with ODBC.jl version v0.8.1, querying Snowflake cloud database.

I'm noticing that a large amount of memory is used in construction of my DataFrames that contain a String column.

I'm running a query that returns 1 String column with 300 rows, and seeing:
- Output from @time:
3.090998 seconds (1.29 k allocations: 4.688 GiB, 3.20% gc time)
- Info from varinfo():
df 7.704 KiB 300×1 DataFrame

In the database the column type is VARCHAR(16777216) even though the strings themselves are not more than 14 characters. Unfortunately we're unable to change the column type as we need to keep the ability to store arbitrary length strings there.

Is there anything we could try as a workaround or anything in ODBC.jl that could make memory usage more efficient/intelligent? Any help appreciated, thanks!

@pnorth1
Copy link
Author

pnorth1 commented Jan 4, 2019

After poking around some more, if I select the same set of 300 rows from a column declared as VARCHAR(128), the memory allocated (and time spent) in DataFrame construction appears much more reasonable:
@time gives 0.436457 seconds (2.77 k allocations: 149.313 KiB).

@quinnj
Copy link
Member

quinnj commented May 23, 2020

Should be fixed on master

@quinnj quinnj closed this as completed May 23, 2020
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

No branches or pull requests

2 participants