Reputation: 1203
I am using the psycopg2 library with Python3 on a linux server to create some temporary tables on Redshift and querying these tables to get results and write to files on the server.
Select a,b from #results_table
or
select * from #results_table
the query just freezes/hangs, but
select top 35 from #results_table
returns the results (select top 40 fails!). There are about a 100 rows in #results_table, and I am not able to get them all. I did a ps aux
and the process just stays in the S+ state. If I manually run the query on Redshift it finishes in seconds.
Any ideas?
Upvotes: 0
Views: 95
Reputation: 1595
Re-declaring a cursor doesn't create new connection while using psycopg2.
Upvotes: 1