Re: [sqlalchemy] "Virtual models" for JSONB data?

2020-07-06 Thread Pedro Ferreira
OK, thanks a lot anyway! I was just wondering if there was already some solution I could reuse. Cheers, Pedro On 03.07.20 17:26, Mike Bayer wrote: > I suppose.  that seems really complicated.    When we use the ORM, we're > defining our domain model in terms of objects, then we define a >

Re: [sqlalchemy] Attaching a second database to a connection

2020-07-06 Thread Mike Bayer
On Mon, Jul 6, 2020, at 11:19 PM, Richard Damon wrote: > SQLite allows a program to attach multiple databases to a single > connection, and you are able to reference tables in these additional > databases with things like schema.table as the name of a table. > > Is there a way to do this in

Re: [sqlalchemy] convert subset to dictionary

2020-07-06 Thread Justvuur
I added the eager-loading but it seems to slow down the SQL query quite a lot. It's as if now, the SQL query is taking longer but the generating of the file is quicker hehe... I guess now the queries are being fired before to populate subjects. It's still taking relatively the same amount of

[sqlalchemy] SQLAlchemy taking too much time to process the result

2020-07-06 Thread Saylee M.
Hello all, Hope you are fine and safe in these times! I can be easily considered as a novice in SQLAlchemy. I am trying to pull data from a MYSQL database from a table having around 20 columns and more than 10 million rows. The table is partitioned and indexed. I am using a complex query,

[sqlalchemy] Re: SQLAlchemy taking too much time to process the result

2020-07-06 Thread 'Jonathan Vanasco' via sqlalchemy
On Monday, July 6, 2020 at 2:14:33 PM UTC-4, Saylee M. wrote: > So, when I passed the query to MySQL directly, it took very less time > (around 0.016 seconds) but when I passed the same > query through SQLAlchemy connector, it took around 600 seconds > "query ... MySQL directly" Do you

Re: [sqlalchemy] SQLAlchemy taking too much time to process the result

2020-07-06 Thread Mike Bayer
On Mon, Jul 6, 2020, at 2:14 PM, Saylee M. wrote: > Hello all, > Hope you are fine and safe in these times! > > I can be easily considered as a novice in SQLAlchemy. > I am trying to pull data from a MYSQL database from a table having around 20 > columns and more than 10 million rows. > The

[sqlalchemy] Attaching a second database to a connection

2020-07-06 Thread Richard Damon
SQLite allows a program to attach multiple databases to a single connection, and you are able to reference tables in these additional databases with things like schema.table as the name of a table. Is there a way to do this in SQLAlchemy? I am working on an application that will want to import