[Sqlalchemy-users] sqlite/singletonthreadpool leak + fix ???

2006-08-04 Thread [EMAIL PROTECTED]
We're about ready to go to production with our new website (built using pylons, sqlalchemy 0.2.6/sqlite, and kid), so I thought I would point apachebench at it to see how things performed.  I was horrified to see memory consumption going through the roof (i.e. >100MB in less than 10,000 requests!).

Re: [Sqlalchemy-users] delimited identifiers with postgresql

2006-08-04 Thread Aaron Spike
Michael Bayer wrote: > im inclined to just get something in there that does the job for > now...the patch thats on ticket #155 is very close to whats needed. if > you can try it out and maybe link to a "quote=True" keyword argument on > Table and Column, make some test cases, we're in business.

Re: [Sqlalchemy-users] Pool bug?

2006-08-04 Thread Tzahi Fadida
I am not saying i will not use try: finally: rollback. I am building a framework and if a little tiny feature in a project that uses the framerwork that opens a transaction and will not use try finally: means that 100 customers are going to be locked out because of the resource leak, it does not

Re: [Sqlalchemy-users] Pool bug?

2006-08-04 Thread Michael Bayer
On Aug 4, 2006, at 8:29 PM, Tzahi Fadida wrote: > I am not saying there has to be close/rollback/commit, > however, i am convinced that when a transaction/sessionTransaction > object is non existant anymore, then at least the connection must > be freed. > i.e. it just occupies memory and a slot

Re: [Sqlalchemy-users] delimited identifiers with postgresql

2006-08-04 Thread Michael Bayer
On Aug 1, 2006, at 9:18 AM, Aaron Spike wrote: > Michael Bayer wrote: >> thats a good point. although you can use any literal name for a >> column >> name: >> >> mytable.c["somecolumn"] >> >> but if you want to go the "key" route we can, but im pretty sure >> theres >> going to be a lot

Re: [Sqlalchemy-users] psycopg2 ssl

2006-08-04 Thread Michael Bayer
I answered your ticket for this, including some methods that you can specify custom arguments for connect(). check it out and see if it solves your issue. On Aug 3, 2006, at 4:59 PM, Randall Smith wrote: > psycopg2 takes an sslmode argument. Does the connection string > support > an ssl o

Re: [Sqlalchemy-users] Pool bug?

2006-08-04 Thread Tzahi Fadida
On Saturday 05 August 2006 01:47, you wrote: > On Aug 4, 2006, at 7:24 AM, Tzahi Fadida wrote: > >> you can always make your own subclass of Session / SessionTransaction > >> that checks some kind of timeout value upon the next operation. > >> SessionTransaction is not really designed to be held op

Re: [Sqlalchemy-users] count on one to many relationship

2006-08-04 Thread Michael Bayer
what youre looking for is similar to what the SelectResults plugin will give you when you ask for count(). however, the lazy-loading relationships off of a parent object are hardwired to load the instances in when first referenced; since the list of child objects attached to a parent is a

Re: [Sqlalchemy-users] union() seems to clear group_by clauses

2006-08-04 Thread Michael Bayer
On Jul 31, 2006, at 6:49 PM, Kai wrote: > After removing that line, the for loop only removes all order_by > clauses > from the *selects array. Thats nice for the optimizer, but I'm > pretty sure > that it can be removed too. > > class CompoundSelect(SelectBaseMixin, FromClause): > def __

Re: [Sqlalchemy-users] Some questions from a new user

2006-08-04 Thread Michael Bayer
On Aug 4, 2006, at 5:28 AM, Michele Petrazzo wrote: > Hi list, I'm new to sqlalchemy and I want to say... WOW fantastic > library! > > I'm studying this library because I want to move my worker program to > use sqlalchemy in place of tough sql, so before start, just some > questions: > > - Ar

Re: [Sqlalchemy-users] initializing business objects mapped with assign_mapper

2006-08-04 Thread Michael Bayer
On Aug 4, 2006, at 8:24 AM, Sanjaya Kumar Patel wrote: > It seems that __init__ can't be used in a class used along with > assign_mapper. So, need help on what is a recommended way to achieve > initialization. any mapped class may define whatever __init__ method it wants. while assign_mapper

Re: [Sqlalchemy-users] Use of sqlAlchemy on tables without a primary key

2006-08-04 Thread Michael Bayer
jonathan ellis pointed us all to a great series of articles concerning primary keys: http://spyced.blogspot.com/2006/07/single-column-primary-keys-should- be.html the gist of the articles is that *any* concept you are trying to store in a database usually has some kind of unique iden

Re: [Sqlalchemy-users] Pool bug?

2006-08-04 Thread Michael Bayer
On Aug 4, 2006, at 7:24 AM, Tzahi Fadida wrote: >> you can always make your own subclass of Session / SessionTransaction >> that checks some kind of timeout value upon the next operation. >> SessionTransaction is not really designed to be held open for >> arbitrary amounts of time, though. > > I

[Sqlalchemy-users] Use of sqlAlchemy on tables without a primary key

2006-08-04 Thread Bill Noon
I am at a loss on how to use sqlAlchemy Data Mappers to map a set of sql tables that don't have a unique primary key. Lets say I have these tables: CREATE TABLE Customer ( uid integer, timestamp numeric, ts_flag text, nametext,

[Sqlalchemy-users] initializing business objects mapped with assign_mapper

2006-08-04 Thread Sanjaya Kumar Patel
Hi All, I am using assign_mapper to map business objects to tables. The BOs need some initialization. For example, while creating a User, I might need to create an associated 'default' role. A crude example depicting the requirement: Class User(object): def __init__(self): self.ro

Re: [Sqlalchemy-users] Pool bug?

2006-08-04 Thread Tzahi Fadida
On Friday 04 August 2006 08:29, Michael Bayer wrote: > On Aug 3, 2006, at 1:22 PM, Tzahi Fadida wrote: > > I am pretty convinced this is a bug. > > The normal way it should have worked is that all the new sessions > > should > > have got the timeouts exception. The reason they did not is because >

[Sqlalchemy-users] Some questions from a new user

2006-08-04 Thread Michele Petrazzo
Hi list, I'm new to sqlalchemy and I want to say... WOW fantastic library! I'm studying this library because I want to move my worker program to use sqlalchemy in place of tough sql, so before start, just some questions: - Are there, inside the library the "alter" (drop, etc.) sql function? I