How many rows are you fetching, and how many columns in each row?
On Thu, Jun 9, 2022 at 8:37 AM Trainer Go wrote:
> Hello Jonathan,
>
> i already executed the query without using pandas in my programm
>
> query = "SELECT"
> for row in conn.execute(query).fetchall():
> pass
>
> the result
Hello Jonathan,
i already executed the query without using pandas in my programm
query = "SELECT"
for row in conn.execute(query).fetchall():
pass
the result was the same runtime with pandas.
So this cant be the problem. I think so.
Greetings Manuel
Jonathan Vanasco schrieb am Mittwoch,
When you select in the database ui tool, you are just displaying raw data.
When you select within your code snippets above, Python is creating pandas'
DataFrame objects for the results.
These two concepts are not comparable at all. Converting the SQL data to
Python data structures in Pandas
Hello Phil,
i tested both and without printing the result.
table_df = pd.read_sql_query(''SELECT, engine)
#print(table_df)
#query = "SELECT"
#for row in conn.execute(query).fetchall():
#pass
both have nearly the same runtime. So this is not my problem. And yes, they
are the same queries
> On Jun 8, 2022, at 8:29 AM, Trainer Go wrote:
>
> When im using pandas with pd.read_sql_query()
> with chunksize to minimiza the memory usage there is no difference between
> both runtimes..
Do you know that, or is that speculation?
>
> table_df = pd.read_sql_query('''select , engine,
When im using pandas with pd.read_sql_query()
with chunksize to minimiza the memory usage there is no difference between
both runtimes..
table_df = pd.read_sql_query('''select , engine, chunksize = 3)
for df in table_df:
print(df)
the runtime is nearly the same like 5 minutes
thank you Philip,
I will test it today.
Greetings Manuel
Philip Semanchuk schrieb am Dienstag, 7. Juni 2022 um 17:13:28 UTC+2:
>
>
> > On Jun 7, 2022, at 5:46 AM, Trainer Go wrote:
> >
> > Hello guys,
> >
> > Im executing 2 queries in my python program with sqlalchemy using the
> pyodbc
> On Jun 7, 2022, at 5:46 AM, Trainer Go wrote:
>
> Hello guys,
>
> Im executing 2 queries in my python program with sqlalchemy using the pyodbc
> driver.
> The database is a Adaptive SQL Anywhere Version 7 32 Bit.
>
> When im executing the queries in a DB UI it takes 5-6 seconds for both
Hello guys,
Im executing 2 queries in my python program with sqlalchemy using the
pyodbc driver.
The database is a Adaptive SQL Anywhere Version 7 32 Bit.
When im executing the queries in a DB UI it takes 5-6 seconds for both
together and when im using the same queries in my python programm it