Re: [sqlalchemy] timing / profiling object loading ?

2013-09-26 Thread Jonathan Vanasco
yeah. painfully slow. i can't seem to recreate this on a test script. it happens every so often in a pyramid app , but I can't recreate it on a bootstrapped (command line) pyramid instance. my test suite shows this happening instantly. this has been troubling me for over a week since i

[sqlalchemy] pymssql connect mssql server

2013-09-26 Thread 零五
hello everyone, i have a problom with pymssql connect mssql server .please help me to sovle it.thx code: connect_str = rmssql+pymssql:// connect_str += r%s:%s@%s:%s/%s?charset=%s % (self.username, self.password, self.ip, self.port, self.db_name, self.get_encode_display()) engine =

[sqlalchemy] Re: pymssql connect mssql server

2013-09-26 Thread 零五
http://stackoverflow.com/questions/7250464/python-and-pymssql https://bugs.launchpad.net/ubuntu/+source/pymssql/+bug/918896 -- You received this message because you are subscribed to the Google Groups sqlalchemy group. To unsubscribe from this group and stop receiving emails from it, send an

[sqlalchemy] sqlalchemy postgresql error

2013-09-26 Thread mew7wo
windows 7 64bit, flask, sqlalchemy 0.8.2, postgresql latest Traceback (most recent call last): File E:/code/python/sqlalchemy-test/sql-test.py, line 30, in module db.session.add(admin) File build\bdist.win-amd64\egg\sqlalchemy\orm\scoping.py, line 149, in do File

Re: [sqlalchemy] sqlalchemy postgresql error

2013-09-26 Thread Simon King
On Thu, Sep 26, 2013 at 11:09 AM, mew...@gmail.com wrote: windows 7 64bit, flask, sqlalchemy 0.8.2, postgresql latest Traceback (most recent call last): File E:/code/python/sqlalchemy-test/sql-test.py, line 30, in module db.session.add(admin) File

Re: [sqlalchemy] [SA0.7] Possible feature request for subqueryload?

2013-09-26 Thread Ladislav Lenart
Hello. On 25.9.2013 17:15, Michael Bayer wrote: On Sep 25, 2013, at 10:11 AM, Ladislav Lenart lenart...@volny.cz wrote: Hello. Would it be possible to make these two forms session.query(cls).options( subqueryload(cls.foos), subqueryload(cls.foos, Foo.bar), )

Re: [sqlalchemy] timing / profiling object loading ?

2013-09-26 Thread Michael Bayer
the profiling will show you if there's some network/server overhead from fetching rows, if you can see where psycopg2 is actually doing that. On Sep 26, 2013, at 2:44 AM, Jonathan Vanasco jonat...@findmeon.com wrote: yeah. painfully slow. i can't seem to recreate this on a test script. it

Re: [sqlalchemy] pymssql connect mssql server

2013-09-26 Thread Michael Bayer
what is the actual SQL Server version there as well as what FreeTDS are you running On Sep 26, 2013, at 5:58 AM, 零五 shanqiuch...@gmail.com wrote: http://stackoverflow.com/questions/7250464/python-and-pymssql https://bugs.launchpad.net/ubuntu/+source/pymssql/+bug/918896 -- You received

Re: [sqlalchemy] pymssql connect mssql server

2013-09-26 Thread Michael Bayer
this bug report for pymssql is nearing two years old. Please get a more recent version of pymssql as directed in the comments on that ticket: https://bugs.launchpad.net/ubuntu/+source/pymssql/+bug/918896/comments/5 apt-get uninstall python-pymssql; pip install pymssql On Sep 26, 2013, at

Re: [sqlalchemy] [SA0.7] Possible feature request for subqueryload?

2013-09-26 Thread Ladislav Lenart
Thank you for pointing this out! I did not realize that it has such a consequencies, though it is perfectly logical. My bad. All joinedloads are part of the main query now, as they should. Also, ignore my remark about Tag info being not loaded. When there actually are any tags, they get loaded

Re: [sqlalchemy] timing / profiling object loading ?

2013-09-26 Thread Jonathan Vanasco
Thanks. I caved in and stayed up until 3am last night to add a ton of log.debug() statements across the app. The culprit was my read-through-caching layer ( built on dogpile ). It was implemented in such a way that SqlAlchemy looked to have issues. The performance on the DBM datatstore was

Re: [sqlalchemy] timing / profiling object loading ?

2013-09-26 Thread Michael Bayer
That's why I don't have a caching function included with SQLAlchemy. Because then I'd be debugging it, not you :) On Sep 26, 2013, at 11:38 AM, Jonathan Vanasco jonat...@findmeon.com wrote: Thanks. I caved in and stayed up until 3am last night to add a ton of log.debug() statements

Re: [sqlalchemy] timing / profiling object loading ?

2013-09-26 Thread Jonathan Vanasco
On Thursday, September 26, 2013 11:58:26 AM UTC-4, Michael Bayer wrote: That's why I don't have a caching function included with SQLAlchemy. Because then I'd be debugging it, not you :) Ha! My caching is pretty lightweight. I do need to figure out a better system though -- that's for

[sqlalchemy] Sqlalchemy sintax for a query with not like operator

2013-09-26 Thread pyArchInit ArcheoImagineers
Hi to all, I need to realize a query like this select * from my_table where field not like %value1% and field not like %value2% with a sqlalchemy sintax. I looked for around the documentation but it seems be impossible. Am I wrong? It's possible that the only way could be to use the

[sqlalchemy] Re: Sqlalchemy sintax for a query with not like operator

2013-09-26 Thread Jonathan Vanasco
i think this should work: query.filter( ~ table.column.contains('%value2%') ) -- You received this message because you are subscribed to the Google Groups sqlalchemy group. To unsubscribe from this group and stop receiving emails from it, send an email to

Re: [sqlalchemy] Sqlalchemy sintax for a query with not like operator

2013-09-26 Thread Ofir Herzas
Each column has a 'like' method, so you should be able to filter by it: filter(~Table.field.like(%value1%)) Hi to all, I need to realize a query like this select * from my_table where field not like %value1% and field not like %value2% with a sqlalchemy sintax. I looked for around the