-
Notifications
You must be signed in to change notification settings - Fork 186
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
Python client is slow: takes 20min to query data that takes 6 seconds using a cURL command #72
Comments
Hi @pjayathissa, Thanks for an open issue. Could you please share an information how your data looks like (cardinality, amount,...) ? Regards |
Attached is a zip file of the csv that was extracted when using a cURL function and appending the result to a csv |
Thanks @pjayathissa, I am currently investigate this issue... |
Hi @pjayathissa, I prepared fixed version in a branch If you would like to test it then install client via:
Regards |
this is still very very slow # this test returns 194k rows of data
query_api().query(qs,org=org) # ~28s
query_api().query_dataframe(qs,org=org) # ~31.5s
def custom_query_dataframe(qs,org):
httpResp = query_api().query_raw(qs,org=org)
headers = [httpResp.readline() for _ in range(3)] # stuff i dont need(I think?... not sure about "groups")
df = pandas.read_csv(httpResp)
return df.drop(columns=df.columns[:2]) # some extra stuff i dont need
custom_query_dataframe(qs,org=org) # ~1-2s |
Hi @joranbeasley, Could you share how your data looks like? One of the possible speed up could be install a pip install ciso8601 Regards |
Painfully slow here as well with the latest dev version |
Hi @franz101, Could you please share an information how your data looks like - cardinality, amount, example... ? Which version of Python do you use? Regards |
I can confirm that query_api is super slow! 200k records query takes 62 seconds. do you have some solution or workaround? |
@idubinets, see #371 (comment) |
@bednar 's recommendation of installing the |
For me, the current best workaround is still @joranbeasley's idea to go for
|
@ojdo Thanks.
|
Oh! If you apply the above two methods at the same time, the processing time will be greatly reduced!! It took more than 10 minutes for 2.5 million data... |
I am finding the python client to be very very slow
I'm querying the data using python as follows, which takes about 20min to execute
I run the same command using a shell script which extracts the data in about 6 seconds
The text was updated successfully, but these errors were encountered: