Re: [SQLObject] Attempt at Implementing Bound Params inSQLObjectfor get-by-id calls
SQLObject is a Python ORM.
Brought to you by:
ianbicking,
phd
From: Oleg B. <ph...@ph...> - 2007-08-30 19:59:07
|
On Thu, Aug 30, 2007 at 02:49:26PM -0500, Kevin J. Rice wrote: > Two options present themselves: (a) A get-by-id prepare could be run at > table generation time. You cannot do that. http://www.postgresql.org/docs/8.2/static/sql-prepare.html "Prepared statements only last for the duration of the current database session. When the session ends, the prepared statement is forgotten, so it must be recreated before being used again. This also means that a single prepared statement cannot be used by multiple simultaneous database clients; however, each client can create their own prepared statement to use." > 2. Is there agreement that there would be significant performance gain with > it? There could be no agreement. But you might show us there is a gain. > Among the user community, has anyone else turned on SQL debug and watched > all the "select where.. Id=22" stuff goes by and wondered if we could speed > this part up? Yes, I had asked the question myself. And answered it by using SQL*Joins ;) Oleg. -- Oleg Broytmann http://phd.pp.ru/ ph...@ph... Programmers don't die, they just GOSUB without RETURN. |