Python client is slow: takes 20min to query data that takes 6 seconds using a cURL command
See original GitHub issueI 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
result = query_api.query_data_frame('from(bucket: "testing")'
'|> range(start: 2020-02-19T23:30:00Z, stop: now())'
'|> filter(fn: (r) => r._measurement == "awair-api")'
, org=credentials.org)
I run the same command using a shell script which extracts the data in about 6 seconds
curl https://us-west-2-1.aws.cloud2.influxdata.com/api/v2/query?org=org@org.com -XPOST -sS \
-H 'Authorization: Token tokencode==' \
-H 'Accept: application/csv' \
-H 'Content-type: application/vnd.flux' \
-d 'from(bucket:"testing") |> range(start: 2020-02-19T23:30:00Z, stop: now()) |> filter(fn: (r) => r._measurement == "awair-api")' >> test.csv
Issue Analytics
- State:
- Created 4 years ago
- Comments:10 (6 by maintainers)
Top Results From Across the Web
Python requests response is very slow and not equal to cURL
Also, Python is very slow: cURL takes about 6 seconds, but Python is 2 minutes. My cURL command is: curl -L -s -k...
Read more >How do I debug latency issues using curl? - Heroku Help
Issue. My requests are slower from Heroku when compared with a local development server. · Resolution · Network round trip times · Request...
Read more >Getting very slow speed while downloading storage blob.
I am using .net core 3.1 web api application to download it and return it with api response. Following is the code. BlockBlobClient ......
Read more >Change Log – Binance API Documentation - GitHub Pages
Please use WebSocket Streams for live updates to avoid polling the API. ... Updated endpoints for Margin, new parameter archived to query data...
Read more >Date/Time and Interval Functions and Operators - Elastic
Elasticsearch SQL accepts also the plural for each time unit (e.g. both ... Currently, using a precision greater than 6 doesn't make any ......
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Hi @joranbeasley,
Could you share how your data looks like?
One of the possible speed up could be install a
ciso8601. Theciso8601speed up parsing dates a lot of.Regards
@idubinets, see https://github.com/influxdata/influxdb-client-python/issues/371#issuecomment-982396653