[sqlalchemy] Re: Working with large IN lists

2012-02-21 Thread Manav Goel
This depends upon the execution plan of the query and is more really a postgresql question. Google postgresql IN performance and you will get a good idea of it. By the look of your code, Second option would obviously be faster as it hits database once whereas first one flush after every change.

[sqlalchemy] Usage of begin nested

2012-02-14 Thread Manav Goel
will be I commit after adding Myclass and perform insertion of Myclass1 in separate transaction but this way is not appealing to me. Regards, Manav Goel -- You received this message because you are subscribed to the Google Groups sqlalchemy group. To post to this group, send email to sqlalchemy

[sqlalchemy] Re: Understanding sqlalchemy memory usage and releasing unused memory

2012-02-09 Thread Manav Goel
Hey Thanks for the answer even after my half researched questions which I should not have done. :) Yeah I realised that after posting the question and I dig deep into python memory issues and have improved knowledge a lot. In fact objgraph module is a great one for

[sqlalchemy] Understanding sqlalchemy memory usage and releasing unused memory

2012-02-06 Thread Manav Goel
expiring an object creates a weak reference and can be collected by gc if not used. Does expunging an object does the same? mainly how can i make memory taken by object free after usage is over. Thas quite a lot of questions. Thank you for reading. Regards, Manav Goel -- You received this message

[sqlalchemy] and_(condition1,condition2) or condition1 and condition2

2012-01-05 Thread Manav Goel
catch in using second option. Regards, Manav Goel -- You received this message because you are subscribed to the Google Groups sqlalchemy group. To post to this group, send email to sqlalchemy@googlegroups.com. To unsubscribe from this group, send email to sqlalchemy+unsubscr...@googlegroups.com

[sqlalchemy] Strange behavior from Association object in many to many relationships

2011-12-17 Thread Manav Goel
Hi I created a many to many relation between two tables as shown in the tutorial using Association object as I have extra fields in connecting table. I have table User(user_id), Book(book_id) and UserBook(user_id, book_id) This code gave me Integrity error of UserBook.user_id of being

[sqlalchemy] convert_unicode option when using postgre and psycopg2

2011-10-28 Thread Manav Goel
in this combination of postgre and psycopg2? If it converts str to unicode in any case would it be useful to use only unicode from start? I mean assign u prefix before passing normal english string. Regards, Manav Goel -- You received this message because you are subscribed to the Google Groups

[sqlalchemy] Cant understand behavior of sqlalchemy while adding same object twice in a session

2011-10-18 Thread Manav Goel
to problem mentioned in point no 1. it wasted my early id nos as when I committed it saved the last one? I know there is something that I am missing here as I am just a beginner in sqlalchemy. Thanks in advance. Regards, Manav Goel -- You received this message because you are subscribed

[sqlalchemy] Declarative Mapping vs Classic Mapping

2011-10-17 Thread Manav Goel
My question is regarding sqlalchemy version 0.7.2. Are there any limitations in using declarative or classic mapping while using sqlalchemy? My main concern is there any limitation of declarative mapping which can put me in some situation where I am stuck with the tables it will create? Also

Re: [sqlalchemy] Declarative Mapping vs Classic Mapping

2011-10-17 Thread Manav Goel
, Manav Goel On 17-Oct-2011, at 11:06 PM, Michael Bayer wrote: On Oct 17, 2011, at 1:05 PM, Manav Goel wrote: My question is regarding sqlalchemy version 0.7.2. Are there any limitations in using declarative or classic mapping while using sqlalchemy? there's not, a declarative mapping