I have a query which runs on Athena (directly) in 43 second by scanning 90GB data. I then use pyathena to run the same query (I use it in jupyter notebook on EMR) and it just doesn't finish running (and never returns any results). I have tested it for smaller queries (by placing limit 100) and it works. Is there any reason why pyathena is much slower than running queries directly on Athena?
Why pyathena doesn't work on longer running queries while Athena runs them?
1.8k Views Asked by Reyhaneh At
1
There are 1 best solutions below
Related Questions in AMAZON-ATHENA
- Cannot load simple Json file with AWS Athena
- Amazon Athena and compressed S3 files
- Amazon AWS Athena -- Removing Temp Files
- How to use aws athena using nodejs?
- AWS Athena JSON format failure
- Athena not adding partitions after msck repair table
- Location of S3 data for Amazon Athena
- read csv file where value contain comma in AWS athena
- AWS Glue unable to access input data set
- determine address of underlying s3 bucket in Athena
- running aws athena query via pyathena
- how to read escape character in Athena
- How to query Athena string to date in hadoop.hive.serde2.OpenCSVSerde format
- Athena Write Performance to AWS S3
- Athena date format unable to convert string to date formate
Related Questions in PYATHENA
- running aws athena query via pyathena
- Pyathena is super slow compared to querying from Athena
- Pyathena in Jupyter Notebook Can't find aws config file
- Which one is faster for querying Athena: pyathena or boto3?
- raise NoCredentialsError() botocore.exceptions.NoCredentialsError: Unable to locate credentials while connecting S3 using Athena
- PyAthena - Invalid length for parameter RoleArn
- AWS Athena is giving multiple "Connection pool is full, discarding connection" warnings while firing queries from a pyathena package
- Catch AWS's TooManyRequestsException when using Pyathena
- pyathena returns columns name and value separately
- How to Make Sure SQL Alchemy ORM Translates Each Numerical Object to Raw Query Correctly?
- Athena preserve order
- Why pyathena doesn't work on longer running queries while Athena runs them?
- Pyathena "s3_staging_dir" file - how can I get this filename to use it?
- Choosing data catalog in pyathena?
- Fixing error in a SHOW TABLES IN DATABASE name query
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
I guess you are using the fetchall api.
The fetchall method is using fetchone until no more results and that why it take such long time.
You can use the cursor.output_location to get the csv results file Athena creates to read the results (with boto3 for example):
In addition in the next versions of pyathena you will able to read the results to pandas dataframe by using as_pandas api which reads the file from s3.